diff options
author | Dan Williams <dcbw@redhat.com> | 2010-04-14 15:22:48 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-04-14 15:24:26 -0700 |
commit | 73c48c376259f3e30294ac456a504f3da7cc1186 (patch) | |
tree | fcee6ad0be75987317144c4e47c051d364cb97a0 | |
parent | f4067e6204fa5ac87269949e8572b329cf20383c (diff) | |
download | NetworkManager-73c48c376259f3e30294ac456a504f3da7cc1186.tar.gz |
wifi: robustify supplicant info destruction
Zero out the struct so we crash if we ever try to use it after its
been freed.
-rw-r--r-- | src/supplicant-manager/nm-supplicant-interface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 6fa2ee5c31..ca22be5e51 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -188,12 +188,17 @@ nm_supplicant_info_destroy (gpointer user_data) if (!info->disposing) { info->disposing = TRUE; - if (info->call) + if (info->call) { nm_call_store_remove (info->store, G_OBJECT (info->proxy), info->call); + info->call = NULL; + } g_object_unref (info->proxy); + info->proxy = NULL; g_object_unref (info->interface); + info->interface = NULL; + memset (info, 0, sizeof (NMSupplicantInfo)); g_slice_free (NMSupplicantInfo, info); } } |