From aa4d1f5a1e2d939c3c00fd7ae4a6c39f51cd495a Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Thu, 21 Aug 2014 15:04:20 +0300 Subject: [PATCH] vaapivideomemory: avoid NULL pointer unref if GstVaapiImage creation failed. https://bugzilla.gnome.org/show_bug.cgi?id=735156 --- gst/vaapi/gstvaapivideomemory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapivideomemory.c b/gst/vaapi/gstvaapivideomemory.c index 528e217126..176e7f6c81 100644 --- a/gst/vaapi/gstvaapivideomemory.c +++ b/gst/vaapi/gstvaapivideomemory.c @@ -654,7 +654,8 @@ gst_vaapi_video_allocator_new (GstVaapiDisplay * display, gst_video_info_update_from_image (&allocator->image_info, image); gst_vaapi_image_unmap (image); } while (0); - gst_vaapi_object_unref (image); + if (image) + gst_vaapi_object_unref (image); } allocator->image_pool = gst_vaapi_image_pool_new (display,