summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-05-07 07:21:26 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-05-08 09:17:41 (GMT)
commit465beb54c558b1f2a938777197dfc7144a402552 (patch)
tree153b7b341cabdb86f66587c195d37f018ea02866 /gsupplicant
parent6fa32141ace0584db4c987bae95a47a18b2fc8d3 (diff)
downloadconnman-465beb54c558b1f2a938777197dfc7144a402552.zip
connman-465beb54c558b1f2a938777197dfc7144a402552.tar.gz
connman-465beb54c558b1f2a938777197dfc7144a402552.tar.bz2
gsupplicant: Fixing a possible memory leak when disconnecting
Diffstat (limited to 'gsupplicant')
-rw-r--r--gsupplicant/supplicant.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 867fa02..2c1a928 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -3446,8 +3446,10 @@ static void interface_disconnect_result(const char *error,
/* If we are disconnecting from previous WPS successful
* association. i.e.: it did not went through AddNetwork,
* and interface->network_path was never set. */
- if (data->interface->network_path == NULL)
+ if (data->interface->network_path == NULL) {
+ dbus_free(data);
return;
+ }
network_remove(data);
}