[gnome-control-center/wip/networking2: 30/36] network: Fix a small memory leak



commit 5c2e07640eae29d66ca768e7e98f7fd2104af673
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 6 22:34:27 2013 -0500

    network: Fix a small memory leak

 panels/network/net-device-simple.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/net-device-simple.c b/panels/network/net-device-simple.c
index fbd9a1e..633781d 100644
--- a/panels/network/net-device-simple.c
+++ b/panels/network/net-device-simple.c
@@ -124,8 +124,10 @@ nm_device_simple_refresh_ui (NetDeviceSimple *device_simple)
         status = g_string_new (panel_device_state_to_localized_string (nm_device));
         if (state != NM_DEVICE_STATE_UNAVAILABLE)
                 speed = net_device_simple_get_speed (device_simple);
-        if (speed)
+        if (speed) {
                 g_string_append_printf (status, " - %s", speed);
+                g_free (speed);
+        }
         gtk_label_set_label (GTK_LABEL (widget), status->str);
         g_string_free (status, TRUE);
         gtk_widget_set_tooltip_text (widget,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]