summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-13 11:21:59 +0200
committerThomas Haller <thaller@redhat.com>2018-04-13 11:22:17 +0200
commit09e44b96ddbd7185bc061967f93b2cd59ee500ec (patch)
tree34581f551aaff2103418396784eb9522cc939d51
parent378833518a7f24645ec4d517cd809654cef67f88 (diff)
downloadNetworkManager-09e44b96ddbd7185bc061967f93b2cd59ee500ec.tar.gz
policy: fix potential leak of subject in auto_activate_device()
-rw-r--r--src/nm-policy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 9f845c1b0e..0d5f8c79cb 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1192,7 +1192,7 @@ auto_activate_device (NMPolicy *self,
gs_free NMSettingsConnection **connections = NULL;
guint i, len;
gs_free_error GError *error = NULL;
- NMAuthSubject *subject;
+ gs_unref_object NMAuthSubject *subject = NULL;
NMActiveConnection *ac;
nm_assert (NM_IS_POLICY (self));
@@ -1274,8 +1274,6 @@ auto_activate_device (NMPolicy *self,
G_CALLBACK (pending_ac_state_changed), g_object_ref (self));
g_object_weak_ref (G_OBJECT (ac), (GWeakNotify) pending_ac_gone, self);
}
-
- g_object_unref (subject);
}
static gboolean