From 465beb54c558b1f2a938777197dfc7144a402552 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Mon, 7 May 2012 10:21:26 +0300 Subject: [PATCH] gsupplicant: Fixing a possible memory leak when disconnecting --- gsupplicant/supplicant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.7.4