network: Don't unref device after when parsing arguments

When we add the NetDevice pointer to the GPtrArray, we have
a single reference owned by the panel. When iterating over
this GPtrArray, no reference is taken.

The problem is that the code to handle command-line arguments
was unreferencing the NetDevices when iterating over it,
creating a disparity in the ref/unref pairs.

Fix that by simply not unreferencing the NetDevice instance
when iterating over it.

https://bugzilla.gnome.org/show_bug.cgi?id=786514
This commit is contained in:
Georges Basile Stavracas Neto 2017-08-29 05:16:30 -03:00
parent 2556fd5e2c
commit 5a3b19ef33

View file

@ -376,8 +376,6 @@ handle_argv (CcNetworkPanel *panel)
g_object_unref (connection);
}
g_object_unref (object_tmp);
if (done)
return;
}