diff options
author | Jouni Malinen <j@w1.fi> | 2012-07-07 13:00:00 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-07-07 13:00:00 +0300 |
commit | 19991e5fb29a7f0701024e4e7ddd03b7c7b59619 (patch) | |
tree | 4e8053127205b75870a0cd4fffbdacf565a90ea0 /src | |
parent | c7803a0294d8a22c2e2d35645a2a57d66bfe0a04 (diff) | |
download | external_wpa_supplicant_8_ti-19991e5fb29a7f0701024e4e7ddd03b7c7b59619.zip external_wpa_supplicant_8_ti-19991e5fb29a7f0701024e4e7ddd03b7c7b59619.tar.gz external_wpa_supplicant_8_ti-19991e5fb29a7f0701024e4e7ddd03b7c7b59619.tar.bz2 |
WPS UDF: Fix fd leak on error path
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r-- | src/wps/wps_ufd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wps/wps_ufd.c b/src/wps/wps_ufd.c index 3a8bd51..f83bdf4 100644 --- a/src/wps/wps_ufd.c +++ b/src/wps/wps_ufd.c @@ -159,8 +159,10 @@ static void * init_ufd(struct wps_context *wps, } data = os_zalloc(sizeof(*data)); - if (data == NULL) + if (data == NULL) { + close(ufd_fd); return NULL; + } data->ufd_fd = ufd_fd; return data; } |