[Python-checkins] cpython: fix possible memory leak, dealloc newobj

christian.heimes python-checkins at python.org
Sat Oct 6 15:09:14 CEST 2012


http://hg.python.org/cpython/rev/8b2546165960
changeset:   79515:8b2546165960
user:        Christian Heimes <christian at cheimes.de>
date:        Sat Oct 06 15:09:06 2012 +0200
summary:
  fix possible memory leak, dealloc newobj

files:
  Modules/_sha3/sha3module.c |  3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c
--- a/Modules/_sha3/sha3module.c
+++ b/Modules/_sha3/sha3module.c
@@ -474,8 +474,7 @@
 
   error:
     if (newobj) {
-        SHA3_clearstate(newobj->hash_state);
-        /* self->lock is always NULL */
+        SHA3_dealloc(newobj);
     }
     if (data_obj) {
         PyBuffer_Release(&buf);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list