diff --git a/hostapd/main.c b/hostapd/main.c index c169375cf..7a4cfb004 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -557,10 +557,10 @@ int main(int argc, char *argv[]) wpa_debug_open_file(log_file); interfaces.count = argc - optind; - interfaces.iface = os_malloc(interfaces.count * + interfaces.iface = os_zalloc(interfaces.count * sizeof(struct hostapd_iface *)); if (interfaces.iface == NULL) { - wpa_printf(MSG_ERROR, "malloc failed\n"); + wpa_printf(MSG_ERROR, "malloc failed"); return -1; }