[Bug 784302] New: v4l2allocator leak when dmabuf creation fails
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Jun 28 18:35:11 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=784302
Bug ID: 784302
Summary: v4l2allocator leak when dmabuf creation fails
Classification: Platform
Product: GStreamer
Version: 1.8.3
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: mattfischer84 at gmail.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
When the v4l2allocator allocates a dmabuf, I'm observing what appears to be a
memory leak when the dmabuf creation process fails. Specifically, when
duplicating the dmabuf file descriptor fails (i.e. control passes to the
dup_failed: label in gst_v4l2_allocator_alloc_dmabuf()), the allocator itself
has an extra reference placed on it which is never removed, resulting in the
allocator later failing to be cleaned up when the pipeline shuts down.
I was able to resolve the issue by placing a call to gst_object_unref
(allocator) in the dup_failed block. However, I am not positive that this is
the correct fix, as I'm having some trouble understanding the refcounting
semantics of the allocator through all of the GstMemory gymnastics that are
taking place here. I'm also unclear whether the expbuf_failed case would need
the same fix, in which case the unref should go in the cleanup: label or even
in the _cleanup_failed_alloc() function. Can someone advise on exactly what
the correct solution to this issue would be?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list