]> granicus.if.org Git - python/commitdiff
fix possible memory leak, dealloc newobj
authorChristian Heimes <christian@cheimes.de>
Sat, 6 Oct 2012 13:09:06 +0000 (15:09 +0200)
committerChristian Heimes <christian@cheimes.de>
Sat, 6 Oct 2012 13:09:06 +0000 (15:09 +0200)
Modules/_sha3/sha3module.c

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