glupload: Fix allocator leak
authorWonchul Lee <chul0812@gmail.com>
Fri, 15 Nov 2019 09:06:13 +0000 (18:06 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 15 Nov 2019 10:26:48 +0000 (10:26 +0000)
It fixes allocator leak in failure case

gst-libs/gst/gl/gstglupload.c

index 67ec4f4..57232b6 100644 (file)
@@ -1304,6 +1304,7 @@ _raw_data_upload_perform (gpointer impl, GstBuffer * buffer,
   } else {
     GST_ERROR_OBJECT (raw->upload, "Failed to allocate wrapped texture");
     gst_buffer_unref (*outbuf);
+    gst_object_unref (allocator);
     return GST_GL_UPLOAD_ERROR;
   }
   gst_object_unref (allocator);