mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-26 13:49:35 -05:00
WPS UDF: Fix fd leak on error path
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
c7803a0294
commit
19991e5fb2
@ -159,8 +159,10 @@ static void * init_ufd(struct wps_context *wps,
|
|||||||
}
|
}
|
||||||
|
|
||||||
data = os_zalloc(sizeof(*data));
|
data = os_zalloc(sizeof(*data));
|
||||||
if (data == NULL)
|
if (data == NULL) {
|
||||||
|
close(ufd_fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
data->ufd_fd = ufd_fd;
|
data->ufd_fd = ufd_fd;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user