Parcourir la source

OpenSSL: Fix memleak in previous wpabuf changes on an error path

Jouni Malinen il y a 15 ans
Parent
commit
a86a7316a4
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/crypto/tls_openssl.c

+ 1 - 0
src/crypto/tls_openssl.c

@@ -2207,6 +2207,7 @@ struct wpabuf * tls_connection_decrypt(void *tls_ctx,
 	if (res < 0) {
 		tls_show_errors(MSG_INFO, __func__,
 				"Decryption failed - SSL_read");
+		wpabuf_free(buf);
 		return NULL;
 	}
 	wpabuf_put(buf, res);