From d99d5704a4a2c3ef9102123e0b8eca80732f8a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 8 Aug 2017 17:12:06 +0200 Subject: [PATCH] libs: vaapi: object: remove unrequired NULL check Coverity scan bug: Dereference after null check: Either the check against null is unnecessary, or there may be a null pointer dereference. Variable klass has been validated as non-NULL several time before in gst_vaapi_object_new() function, so there is no need to check it again. --- gst-libs/gst/vaapi/gstvaapiobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiobject.c b/gst-libs/gst/vaapi/gstvaapiobject.c index 15af267953..8609ef7791 100644 --- a/gst-libs/gst/vaapi/gstvaapiobject.c +++ b/gst-libs/gst/vaapi/gstvaapiobject.c @@ -98,7 +98,7 @@ gst_vaapi_object_new (const GstVaapiObjectClass * klass, if (sub_size > 0) memset (((guchar *) object) + sizeof (*object), 0, sub_size); - if (klass && klass->init) + if (klass->init) klass->init (object); return object; }