aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-06-27 20:53:29 +0300
committerJouni Malinen <j@w1.fi>2012-06-27 21:22:12 +0300
commit582143e5440c59ca3c0f97e4e2fe73a0af8750ee (patch)
tree59128718013360cc8c263a0cfa54ad2a1ece219d /src/wps
parent7be6dc2e96f160743a8db0fb7bc62cd713a00c7c (diff)
downloadexternal_wpa_supplicant_8_ti-582143e5440c59ca3c0f97e4e2fe73a0af8750ee.zip
external_wpa_supplicant_8_ti-582143e5440c59ca3c0f97e4e2fe73a0af8750ee.tar.gz
external_wpa_supplicant_8_ti-582143e5440c59ca3c0f97e4e2fe73a0af8750ee.tar.bz2
WPS: Fix potential memory leak with NFC password token
The old stored public key hash needs to be freed before replacing the pointer with the new value. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wps/wps_common.c b/src/wps/wps_common.c
index 20e0824..510d99d 100644
--- a/src/wps/wps_common.c
+++ b/src/wps/wps_common.c
@@ -384,6 +384,7 @@ static int wps_parse_oob_dev_pwd(struct wps_context *wps,
pos = attr.oob_dev_password;
+ wpabuf_free(oob_conf->pubkey_hash);
oob_conf->pubkey_hash =
wpabuf_alloc_copy(pos, WPS_OOB_PUBKEY_HASH_LEN);
if (oob_conf->pubkey_hash == NULL) {