fix possible memory leak, dealloc newobj

This commit is contained in:
Christian Heimes 2012-10-06 15:09:06 +02:00
parent 23c5bb4030
commit c018f57186
1 changed files with 1 additions and 2 deletions

View File

@ -474,8 +474,7 @@ SHA3_factory(PyObject *args, PyObject *kwdict, const char *fmt,
error: error:
if (newobj) { if (newobj) {
SHA3_clearstate(newobj->hash_state); SHA3_dealloc(newobj);
/* self->lock is always NULL */
} }
if (data_obj) { if (data_obj) {
PyBuffer_Release(&buf); PyBuffer_Release(&buf);