GNOME Bugzilla – Bug 788243
nvbaseenc: fix unmap video frame in failed case
Last modified: 2017-10-13 15:45:50 UTC
Created attachment 360537 [details] [review] patch file attached Hi , In gst_nv_base_enc_handle_frame(), unmap video frame is missed in error case. code: flow = _acquire_input_buffer (nvenc, &input_buffer); if (flow != GST_FLOW_OK) return flow; if (input_buffer == NULL) return GST_FLOW_ERROR; sol: called goto out and goto error in failed case. This will unmap video frame . if (flow != GST_FLOW_OK) goto out; if (input_buffer == NULL) goto error; Please review and share feedback.
Created attachment 360584 [details] [review] attached patch Pathc attached . Please review
Comment on attachment 360537 [details] [review] patch file attached And please mark old patches as obsolete when you attach new ones :)
Comment on attachment 360584 [details] [review] attached patch It looks like more leaks are hiding in the code below there. state and input_buffer are leaked in the "goto error" cases below, frame if we don't go into the "if (nvenc->gl_input)" and not in the "if (!nvenc->gl_input)" case. Please review the code in this function again :)
sure . I will check and update the patch soon
Created attachment 361091 [details] [review] patch file attached Patch attached. Please review
Patch attached. Please review and share feedback
Comment on attachment 361091 [details] [review] patch file attached Please mark your patches as patches (or use git-bz)
commit 53ea2f82ae4160cd53449272121dc9de31df45f8 (HEAD -> master) Author: Ponnam Srinivas <p.srinivas@samsung.com> Date: Sat Oct 7 14:57:44 2017 +0530 nvbaseenc: Fix Memory leak in error case https://bugzilla.gnome.org/show_bug.cgi?id=788243