]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix memleak in previous wpabuf changes on an error path
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 17:12:59 +0000 (19:12 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 17:12:59 +0000 (19:12 +0200)
src/crypto/tls_openssl.c

index 689e6aac05ba134a7147f71148ba9b217504e7c4..cc67938ac34893a84205d32b2f651ee6b20900fa 100644 (file)
@@ -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);