From 8ff4837830d2f5ef43cfd0694f39a852d489158b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 4 May 2022 00:05:09 +0300 Subject: [PATCH] Fix tls_connection_set_success_data() in TLS library wrappers Some of the TLS library wrappers defined only an empty function for tls_connection_set_success_data(). That could result in memory leaks in TLS server cases, so update these to do the minimal thing and free the provided buffer as unused. Signed-off-by: Jouni Malinen --- components/wpa_supplicant/src/crypto/tls_internal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/wpa_supplicant/src/crypto/tls_internal.c b/components/wpa_supplicant/src/crypto/tls_internal.c index d7c4743c2c..64451a90d8 100644 --- a/components/wpa_supplicant/src/crypto/tls_internal.c +++ b/components/wpa_supplicant/src/crypto/tls_internal.c @@ -784,6 +784,7 @@ int tls_get_library_version(char *buf, size_t buf_len) void tls_connection_set_success_data(struct tls_connection *conn, struct wpabuf *data) { + wpabuf_free(data); }