wpa_supplicant: Fix some memory leak issues by coverity static analyzer.

This commit is contained in:
aditi_lonkar
2021-01-20 17:03:05 +05:30
committed by bot
parent 728801883e
commit 562a5dd215
2 changed files with 6 additions and 2 deletions

View File

@@ -667,7 +667,7 @@ static int sae_derive_commit_element_ffc(struct sae_data *sae,
static int sae_derive_commit(struct sae_data *sae)
{
struct crypto_bignum *mask;
struct crypto_bignum *mask = NULL;
int ret = -1;
unsigned int counter = 0;
@@ -683,6 +683,9 @@ static int sae_derive_commit(struct sae_data *sae)
return ESP_FAIL;
}
if (mask) {
crypto_bignum_deinit(mask, 1);
}
mask = sae_get_rand_and_mask(sae);
if (mask == NULL) {
wpa_printf(MSG_DEBUG, "SAE: Could not get rand/mask");