aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_wext.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-05-25 09:06:25 (GMT)
committerJouni Malinen <j@w1.fi>2010-05-25 09:06:25 (GMT)
commit5216938960b8ef9f7c066f4c6afa4b4018c3a348 (patch)
tree57622bbec4f9638b925081fde5f681b79a24b53e /src/drivers/driver_wext.c
parent8c0ef181996828403febae7acdd818c023204eff (diff)
downloadhostap-5216938960b8ef9f7c066f4c6afa4b4018c3a348.zip
hostap-5216938960b8ef9f7c066f4c6afa4b4018c3a348.tar.gz
hostap-5216938960b8ef9f7c066f4c6afa4b4018c3a348.tar.bz2
Fix memory leak on rfkill init error path
Diffstat (limited to 'src/drivers/driver_wext.c')
-rw-r--r--src/drivers/driver_wext.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index ef3a30c..2223783 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -762,8 +762,10 @@ void * wpa_driver_wext_init(void *ctx, const char *ifname)
rcfg->blocked_cb = wpa_driver_wext_rfkill_blocked;
rcfg->unblocked_cb = wpa_driver_wext_rfkill_unblocked;
drv->rfkill = rfkill_init(rcfg);
- if (drv->rfkill == NULL)
+ if (drv->rfkill == NULL) {
wpa_printf(MSG_DEBUG, "WEXT: RFKILL status not available");
+ os_free(rcfg);
+ }
drv->mlme_sock = -1;