After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785341 - videofilter: Forgets to unmap input buffer after failing to map output buffer
videofilter: Forgets to unmap input buffer after failing to map output buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.12.2
Other All
: Normal normal
: 1.12.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-24 13:49 UTC by Satya Prakash Gupta
Modified: 2017-07-25 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch file is attached. (1.02 KB, patch)
2017-07-24 13:49 UTC, Satya Prakash Gupta
committed Details | Review

Description Satya Prakash Gupta 2017-07-24 13:49:50 UTC
Created attachment 356299 [details] [review]
Patch file is attached.

Hi All,

There is Possible memory leak in below scenario.

File : gst-plugins-base/gst-libs/gst/video/gstvideofilter.c

Function  gst_video_filter_transform:

in_frame unmap is missing .
 if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
            GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) {
       goto invalid_buffer;

Solution : gst_video_frame_unmap (&in_frame) should be before goto statement.

++patch is attched for possible solution.

Kindly review the patch and provide your feedback.
Comment 1 Sebastian Dröge (slomo) 2017-07-24 14:05:54 UTC
commit 5cf883c8ed6bbecd4ceb8e62d5109d1092ba385f (HEAD -> master)
Author: Satya Prakash Gupta <sp.gupta@samsung.com>
Date:   Mon Jul 24 19:18:49 2017 +0530

    videofilter: Unmap input frame if mapping output frame failed
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785341