From 13ee37f480837177e9abf6958b9d1aaa891c4fcd Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 27 Nov 2006 21:48:33 +0000 Subject: [PATCH] 2006-11-27 Dan Williams Patch from Christian Persch * gnome/applet/applet-dbus-devices.c - (hal_info_product_cb): fix memleak; free duped string. Gnome.org #379908 git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2131 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 8 ++++++++ gnome/applet/applet-dbus-devices.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 97a208f723..f3b1cb2a9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-11-27 Dan Williams + + Patch from Christian Persch + + * gnome/applet/applet-dbus-devices.c + - (hal_info_product_cb): fix memleak; free duped string. + Gnome.org #379908 + 2006-11-27 Dan Williams Patch from Christian Persch diff --git a/gnome/applet/applet-dbus-devices.c b/gnome/applet/applet-dbus-devices.c index 5d201afb4c..f1b1b8fd19 100644 --- a/gnome/applet/applet-dbus-devices.c +++ b/gnome/applet/applet-dbus-devices.c @@ -322,9 +322,11 @@ static void hal_info_product_cb (DBusPendingCall *pcall, void *user_data) if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &info_product, DBUS_TYPE_INVALID)) { - char *desc = g_strdup_printf ("%s %s", cb_data->vendor, info_product); + char *desc; - network_device_set_desc (cb_data->dev, desc); + desc = g_strdup_printf ("%s %s", cb_data->vendor, info_product); + network_device_set_desc (cb_data->dev, desc); + g_free (desc); } dbus_message_unref (reply);