From: Jouni Malinen Date: Sat, 27 Apr 2013 20:05:52 +0000 (+0300) Subject: Use os_zalloc() instead of os_malloc() + os_memset() X-Git-Tag: aosp-kk-from-upstream~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b44ad7e162203db56056503d806246ee6a2ad0f;p=thirdparty%2Fhostap.git Use os_zalloc() instead of os_malloc() + os_memset() Signed-hostap: Jouni Malinen --- diff --git a/hostapd/config_file.c b/hostapd/config_file.c index cd68e3ef9..21104d302 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -83,7 +83,7 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss, return -1; } - vlan = os_malloc(sizeof(*vlan)); + vlan = os_zalloc(sizeof(*vlan)); if (vlan == NULL) { wpa_printf(MSG_ERROR, "Out of memory while reading " "VLAN interfaces from '%s'", fname); @@ -91,7 +91,6 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss, return -1; } - os_memset(vlan, 0, sizeof(*vlan)); vlan->vlan_id = vlan_id; os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname)); if (bss->vlan_tail)