GNOME Bugzilla – Bug 787711
Gstomxh264enc : Fix Memory leak in error case
Last modified: 2017-09-22 08:55:25 UTC
Hi, It is observed that there is memory leak in omxmodule. File Name : omx/Gstomx264enc.c Function Name : gst_omx_h264_enc_get_caps In Gstomx264enc.c at gst_omx_h264_enc_get_caps line : 441 memory is allocated for caps ,But in case of fail it has not been unref. Sol : gst_caps_unref (caps); Please provide your feedback.
You should maybe provide a patch, checkout the gst-omx (master), correct the issue, commmit, git format-patch -1, and then attach the patch file to this ticket.
Okay I will attach patch file soon
See https://gstreamer.freedesktop.org/documentation/contribute/#how-to-submit-patches for more details
I am creating the Patch. I will a attach soon
sorry for delay. definitely will attach the patch today
Created attachment 360020 [details] [review] patch file attached
Comment on attachment 360020 [details] [review] patch file attached Thanks for the patch. Same comments as in bug #787714. Feel free to squash both patches into one commit as well :)
Created attachment 360101 [details] [review] patch file attached attached patch. Please review it. Please accept this patch. Next time onwards I will add in single commit if multiple patchs in same module
Comment on attachment 360101 [details] [review] patch file attached https://bugzilla.gnome.org/show_bug.cgi?id=787714#c8
Created attachment 360174 [details] [review] Attached the patch correct the indentation. Please review it . attach patch file.
Please review attach patch file and share feedback
Please have some patience, if you want to get your patches reviewed faster help out getting other patches reviewed. There are many.
The unrefs after g_assert_not_reached () look The static analyzer should be thought about g_assert_not_reached instead.
"look bogus".
commit 1f3663743422e7dbcbc22ec938437bd057151863 (HEAD -> master) Author: Ponnam Srinivas <p.srinivas@samsung.com> Date: Thu Sep 21 15:21:36 2017 +0530 omxh264enc: fix caps leak https://bugzilla.gnome.org/show_bug.cgi?id=787711
(In reply to Tim-Philipp Müller from comment #13) > The unrefs after g_assert_not_reached () look > > The static analyzer should be thought about g_assert_not_reached instead. Yes, for clean-ness I'd keep the unrefs there though. Someone might want to remove the assertions later because they are actually valid cases, and then forget to put the unref there.