network: Fix memleak when argv changes

This commit is contained in:
Bastien Nocera 2011-09-08 15:43:23 +01:00
parent eeffc8e385
commit 72b9db71c8

View file

@ -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]);