Commit ec76f179 authored by Bernd Edlinger's avatar Bernd Edlinger
Browse files

Fix a memory leak in tls1_mac

parent ba2502d7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -988,8 +988,10 @@ int tls1_mac(SSL *ssl, SSL3_RECORD *rec, unsigned char *md, int sending)
        mac_ctx = hash;
    } else {
        hmac = EVP_MD_CTX_new();
        if (hmac == NULL || !EVP_MD_CTX_copy(hmac, hash))
        if (hmac == NULL || !EVP_MD_CTX_copy(hmac, hash)) {
            EVP_MD_CTX_free(hmac);
            return -1;
        }
        mac_ctx = hmac;
    }