MFC: sync with head for null ptr deref and static array overflow

This commit is contained in:
sam 2006-09-02 17:31:08 +00:00
parent b4a1a92fb0
commit 4f70b6f9ea

View File

@ -129,7 +129,7 @@ static int
bsd_configure_wpa(struct bsd_driver_data *drv)
{
static const char *ciphernames[] =
{ "WEP", "TKIP", "AES-OCB", "AES-CCM", "CKIP", "NONE" };
{ "WEP", "TKIP", "AES-OCB", "AES-CCM", "*BAD*", "CKIP", "NONE" };
hostapd *hapd = drv->hapd;
struct hostapd_config *conf = hapd->conf;
int v;
@ -836,12 +836,13 @@ bsd_init(struct hostapd_data *hapd)
hapd->driver = &drv->ops;
return 0;
bad:
if (drv->sock_xmit != NULL)
l2_packet_deinit(drv->sock_xmit);
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
if (drv != NULL)
if (drv != NULL) {
if (drv->sock_xmit != NULL)
l2_packet_deinit(drv->sock_xmit);
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
free(drv);
}
return -1;
}