core: fix recently introduced crash in nm-manager

find_master() does not (always) set the output parameters. Initialize
paramter to NULL before calling find_master().

Just introduced recently with commit 8123cd2410.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-01-30 16:22:27 +01:00
parent bd7e647914
commit f9022b8fb3

View file

@ -1938,7 +1938,7 @@ add_device (NMManager *self, NMDevice *device, gboolean generate_con)
subject = nm_auth_subject_new_internal ();
active = _new_active_connection (self, connection, NULL, device, subject, &error);
if (active) {
NMActiveConnection *master_ac;
NMActiveConnection *master_ac = NULL;
/* If the device is a slave or VLAN, find the master ActiveConnection */
if (find_master (self, connection, device, NULL, NULL, &master_ac, NULL) && master_ac)