[Bug 788465] baseparse: memory leak in error code path

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Oct 5 08:41:39 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=788465

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #360946|none                        |reviewed
             status|                            |

--- Comment #3 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 360946
  --> https://bugzilla.gnome.org/attachment.cgi?id=360946
Please find the attached Patch.

Not clear to me that this is correct.

The docs say that this function takes ownership of the frame's buffer, but not
the frame. However, we only take ownership of the frame's buffer later in the
code as far as I can see.

If we unref the buffer here, we need to clear it from the frame I think,
otherwise we leave a dangling pointer around.

But to me it seems like it should be fine to leave the buffer in the frame in
the error case, and then it should be unreffed when the frame gets freed.

It's not clear to me that this needs fixing at all.

-- 
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