From fcf8c84ad51f18b2fcf2dc2e37334c8876982edb Mon Sep 17 00:00:00 2001 From: Zhang Jun Hao Date: Tue, 16 Nov 2021 10:19:26 +0800 Subject: [PATCH] fix potential leak of memory check error --- .../wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c b/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c index 577b50d202..f82d44980a 100644 --- a/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c +++ b/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c @@ -894,6 +894,7 @@ int rc4_skip(const u8 *key, size_t keylen, size_t skip, if ((ret = mbedtls_arc4_crypt(&ctx, len, skip_buf_in, skip_buf_out)) != 0) { wpa_printf(MSG_ERROR, "rc4 encryption failed"); + os_free(obuf); return -1; } os_memcpy(skip_buf_in, skip_buf_out, 16);