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 737870 - There is a memory leak in gssdp-client/socket_source_cb
There is a memory leak in gssdp-client/socket_source_cb
Status: RESOLVED FIXED
Product: gssdp
Classification: Other
Component: General
0.14.x
Other All
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-04 01:50 UTC by Richard Röjfors
Modified: 2019-02-22 09:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing the mem leak (1.02 KB, patch)
2014-10-04 01:50 UTC, Richard Röjfors
committed Details | Review

Description Richard Röjfors 2014-10-04 01:50:13 UTC
Created attachment 287702 [details] [review]
Patch fixing the mem leak

Each message received by g_socket_receive_message is leaked.

According to the gio documentation:
messages , if non-NULL, will be set to point to a newly-allocated array of GSocketControlMessage instances or NULL if no such messages was received. These correspond to the control messages received from the kernel, one GSocketControlMessage per message from the kernel. This array is NULL-terminated and must be freed by the caller using g_free() after calling g_object_unref() on each element. If messages is NULL, any control messages received will be discarded.

The attached patch derefs and frees as documented.
Comment 1 Jens Georg 2014-10-04 09:08:58 UTC
Review of attachment 287702 [details] [review]:

Whoops. Thanks.