Merge branch 'moonshot' of ssh://moonshot.suchdamage.org:822/srv/git/libeap into...
[libeap.git] / hostapd / main.c
index 71dfdc9..9c532d4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * hostapd / main()
- * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2002-2010, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -209,6 +209,7 @@ static struct hostapd_iface * hostapd_init(const char *config_file)
                                               &conf->bss[i]);
                if (hapd == NULL)
                        goto fail;
+               hapd->msg_ctx = hapd;
        }
 
        return hapd_iface;
@@ -279,6 +280,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);
@@ -445,7 +448,7 @@ static void show_version(void)
                "hostapd v" VERSION_STR "\n"
                "User space daemon for IEEE 802.11 AP management,\n"
                "IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n"
-               "Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi> "
+               "Copyright (c) 2002-2010, Jouni Malinen <j@w1.fi> "
                "and contributors\n");
 }