From 9078adfc8ca02ec158ac2c298fc1f84691e80a2b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 3 Jan 2010 10:54:14 +0200 Subject: [PATCH] hostapd: Fix deinit on initialization failure --- hostapd/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hostapd/main.c b/hostapd/main.c index 71dfdc97d..00ce22d10 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -279,6 +279,8 @@ static void hostapd_interface_deinit_free(struct hostapd_iface *iface) { const struct wpa_driver_ops *driver; void *drv_priv; + if (iface == NULL) + return; driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; hostapd_interface_deinit(iface);