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 773932 - vdpsink: Fix memory leak due to usage of Xlib API
vdpsink: Fix memory leak due to usage of Xlib API
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-04 06:37 UTC by Gaurav
Modified: 2016-11-05 11:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix memory leak due to usage of Xlib API (847 bytes, patch)
2016-11-04 06:37 UTC, Gaurav
committed Details | Review

Description Gaurav 2016-11-04 06:37:46 UTC
Created attachment 339101 [details] [review]
Fix memory leak due to usage of Xlib API

Check attached patch for  below fix:
       if (title) {
         if ((XStringListToTextProperty (((char **) &title), 1,
-                    &xproperty)) != 0)
+                    &xproperty)) != 0) {
           XSetWMName (vdp_sink->device->display, window->win, &xproperty);
+          XFree (xproperty.value);
+       }

         g_free (title_mem);
       }



Memory allocated to xproperty.value should be freed by the caller.
Comment 1 Tim-Philipp Müller 2016-11-05 11:42:48 UTC
Thanks for the patch, but this code is not even built at the moment :)

Pushed it anyway, but usually we try not to do phantom patches for code that's not in use :)

commit fd2fed4844b26c75cf380d0ebd0c0c0280a2315b
Author: Gaurav Gupta <g.gupta@samsung.com>
Date:   Fri Nov 4 11:56:13 2016 +0530

    vdpsink: fix Memory leak due to Xlib API usage
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773932