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 693879 - Memory leaks in network panel
Memory leaks in network panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-15 12:24 UTC by Thomas Bechtold
Modified: 2013-02-15 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix a couple of memleaks (2.94 KB, patch)
2013-02-15 12:26 UTC, Thomas Bechtold
committed Details | Review

Description Thomas Bechtold 2013-02-15 12:24:50 UTC
Found a couple of memleaks in the network-panel.
Comment 1 Thomas Bechtold 2013-02-15 12:26:24 UTC
Created attachment 236238 [details] [review]
Fix a couple of memleaks
Comment 2 Bastien Nocera 2013-02-15 12:40:48 UTC
Review of attachment 236238 [details] [review]:

::: panels/network/net-object.c
@@ +112,3 @@
 {
         g_return_if_fail (NET_IS_OBJECT (object));
+        if (object->priv->title)

g_clear_pointer (&object->priv->title);
would do the same thing on one line.

@@ +356,3 @@
 {
         object->priv = NET_OBJECT_GET_PRIVATE (object);
+        object->priv->id = NULL;

That's not necessary, the private structure in GObjects gets initialised to zero by default.
Comment 3 Bastien Nocera 2013-02-15 12:46:52 UTC
Fixed with the mentioned fixes (and without the wrong number of args in my g_clear_pointer() examples ;)