[gnome-control-center/gnome-3-2] network: Fix memleak when argv changes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-2] network: Fix memleak when argv changes
- Date: Thu, 8 Sep 2011 16:06:54 +0000 (UTC)
commit 0309eb5e49f1324ba3e7cf84a149c127b397edfd
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 8 15:43:23 2011 +0100
network: Fix memleak when argv changes
panels/network/cc-network-panel.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 49dbb12..0ec37f2 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -152,7 +152,16 @@ cc_network_panel_set_property (GObject *object,
switch (property_id) {
case PROP_ARGV: {
- gchar **args = g_value_get_boxed (value);
+ gchar **args;
+
+ priv->arg_operation = OPERATION_NULL;
+ g_free (priv->arg_device);
+ priv->arg_device = NULL;
+ g_free (priv->arg_access_point);
+ priv->arg_access_point = NULL;
+
+ **args = g_value_get_boxed (value);
+
if (args) {
g_debug ("Invoked with operation %s", args[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]