Fix crash issue when passphrase decryption fails 53/290753/2
authorJaehyun Kim <jeik01.kim@samsung.com>
Fri, 31 Mar 2023 13:38:29 +0000 (22:38 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Fri, 31 Mar 2023 13:42:56 +0000 (22:42 +0900)
commit5c15ba3d4d5c841cf53a17db452eed624ac68bb1
tree35d163866c75a6eedfd0dc686d7390034b9f46d9
parentb70dafc0d1bb160625f34db0446c58b859982b48
Fix crash issue when passphrase decryption fails

If the decryption request is successful
and there is an error in response,
memory is not allocated to the data->sid->passphrase.
However, even in this case, it is freed and it cause a crash.
So it has been modified to free only when memory is allocated.

In addition to this, there are other variables
that have similar problems,
so the related codes have also been modified.

Change-Id: If83febbccfcff82cf83279f7186df73aaee0854c
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
gsupplicant/gsupplicant.h
gsupplicant/supplicant.c