mesh: Fix error path handling for RSN (MGTK init)
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 30 May 2016 17:15:16 +0000 (20:15 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 30 May 2016 17:15:16 +0000 (20:15 +0300)
commitb4c738ec86a933c7fb967fbea9a6c87b10620a28
tree340b15faa6766626a70daf4d6afea64d672d03b3
parent4d4cdc3bb2f97238519a5737bb7e313115f3c8a7
mesh: Fix error path handling for RSN (MGTK init)

wpa_deinit() got called twice if the random_get_bytes() fails to
generate the MGTK. This resulted in double-freeing the rsn->auth
pointer. Fix this by allowing mesh_rsn_auth_init() handle freeing for
all error cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/mesh_rsn.c