Skip to content

Commit c41e3d0

Browse files
committed
fix leak in hmac_digest
1 parent 1ac957b commit c41e3d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_hashopenssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,7 @@ _hmac_digest(HMACobject *self, unsigned char *buf, unsigned int len)
17401740
return 0;
17411741
}
17421742
if (!locked_HMAC_CTX_copy(temp_ctx, self)) {
1743+
HMAC_CTX_free(temp_ctx);
17431744
_setException(PyExc_ValueError, NULL);
17441745
return 0;
17451746
}

0 commit comments

Comments
 (0)