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 784741 - libswscale: Memory leak in gst_video_frame_map.
libswscale: Memory leak in gst_video_frame_map.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
1.12.1
Other All
: Normal critical
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-10 10:37 UTC by Satya Prakash Gupta
Modified: 2017-07-17 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libswscale: Memory leak in gst_video_frame_map. (974 bytes, patch)
2017-07-17 07:52 UTC, Satya Prakash Gupta
committed Details | Review

Description Satya Prakash Gupta 2017-07-10 10:37:26 UTC
libswscale: Memory leak in gst_video_frame_map. 

gst-libav-1.12.1/gst-libav-1.12.1/ext/libswscale

In function "gst_ffmpegscale_transform" at line: 587
gst_video_frame_map at line 596:

if  "gst_video_frame_map" failed then there is no unmap of in_frame.So I think it will cause memory leak.


Solution:  if gst_video_frame_map is failed then there should  gst_video_frame_unmap (&in_frame);

Please consider it.
Comment 1 Sebastian Dröge (slomo) 2017-07-11 06:24:37 UTC
Do you want to provide a patch? Note that swscale is deprecated and not even built anymore
Comment 2 Satya Prakash Gupta 2017-07-11 06:27:35 UTC
Yes.. Will it be accepted?
Comment 3 Sebastian Dröge (slomo) 2017-07-11 06:32:59 UTC
Sure, why not. But the code might completely disappear soonish
Comment 4 Satya Prakash Gupta 2017-07-17 07:52:17 UTC
Created attachment 355734 [details] [review]
libswscale: Memory leak in gst_video_frame_map.

Hi All ,


Please check attached patch and provide your feedback.
Comment 5 Sebastian Dröge (slomo) 2017-07-17 12:37:09 UTC
commit 7c304c0c1ed37cac2001aa9ecd7ebd6a8715a042 (HEAD -> master)
Author: Satya Prakash Gupta <sp.gupta@samsung.com>
Date:   Tue Jul 11 13:45:35 2017 +0530

    libswscale: Memory leak in gst_video_frame_map
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784741