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 611428 - [gdiscreencapsrc] leaks memory (ICONINFO)
[gdiscreencapsrc] leaks memory (ICONINFO)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-28 21:24 UTC by Tim-Philipp Müller
Modified: 2010-12-13 23:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2010-02-28 21:24:14 UTC
See

http://news.gmane.org/find-root.php?message_id=%3cebced3c11002240837p7ad792afhf0d8f4a4e0caa962%40mail.gmail.com%3e

including patch (by Francis Rammeloo <francis.rammeloo <at> gmail.com>)

--- Main/GStreamer/Source/gst-plugins-bad/sys/winscreencap/gstgdiscreencapsrc.c	(revision
442)
+++ Main/GStreamer/Source/gst-plugins-bad/sys/winscreencap/gstgdiscreencapsrc.c	(working
copy)
@@ -552,6 +552,9 @@
           ci.ptScreenPos.x - src->src_rect.left - ii.xHotspot,
           ci.ptScreenPos.y - src->src_rect.top - ii.yHotspot, ci.hCursor, 0, 0,
           0, NULL, DI_DEFAULTSIZE | DI_NORMAL | DI_COMPAT);
+
+      DeleteObject (ii.hbmColor);
+      DeleteObject (ii.hbmMask);
     }
   }
Comment 1 Tim-Philipp Müller 2010-12-13 23:19:03 UTC
commit 6792b0fb1661fb85ccb69cc2a3233cd38bfe69c2
Author: Francis Rammeloo <francis.rammeloo@gmail.com>
Date:   Mon Dec 13 23:15:05 2010 +0000

    gdiscreencapsrc: fix memory leak
    
    Structure members of ICONINFO struct filled by GetIconInfo() must
    be deleted when no longer needed according to the API reference.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=611428