Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c018f57

Browse files
committed
fix possible memory leak, dealloc newobj
1 parent 23c5bb4 commit c018f57

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Modules/_sha3/sha3module.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,7 @@ SHA3_factory(PyObject *args, PyObject *kwdict, const char *fmt,
474474

475475
error:
476476
if (newobj) {
477-
SHA3_clearstate(newobj->hash_state);
478-
/* self->lock is always NULL */
477+
SHA3_dealloc(newobj);
479478
}
480479
if (data_obj) {
481480
PyBuffer_Release(&buf);

0 commit comments

Comments
 (0)