diff options
author | Ilan Peer <ilan.peer@intel.com> | 2017-06-08 08:17:58 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2017-07-08 13:14:03 (GMT) |
commit | 422570eec805331de05156244b6301d5d8b6a998 (patch) | |
tree | 8634b5fb0cfc6ea2988c9745ee9453580573403b /wpa_supplicant | |
parent | e4e99927bf6b92ed096c3e5d121633e5b5004180 (diff) | |
download | hostap-422570eec805331de05156244b6301d5d8b6a998.zip hostap-422570eec805331de05156244b6301d5d8b6a998.tar.gz hostap-422570eec805331de05156244b6301d5d8b6a998.tar.bz2 |
MBO: Fix possible memory leak in anqp_send_req()
In case that an mbo object is allocated, but there is a failure
to resize the wpabuf, need to free the mbo object.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r-- | wpa_supplicant/interworking.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 3b4b639..dd5a724 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -2738,6 +2738,7 @@ int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, if (mbo) { if (wpabuf_resize(&extra_buf, wpabuf_len(mbo))) { wpabuf_free(extra_buf); + wpabuf_free(mbo); return -1; } wpabuf_put_buf(extra_buf, mbo); |