[Python-checkins] r47010 - python/trunk/Modules/_bsddb.c

neal.norwitz python-checkins at python.org
Sun Jun 18 00:38:16 CEST 2006


Author: neal.norwitz
Date: Sun Jun 18 00:38:15 2006
New Revision: 47010

Modified:
   python/trunk/Modules/_bsddb.c
Log:
Fix memory leak reported by valgrind while running test_subprocess

Modified: python/trunk/Modules/_bsddb.c
==============================================================================
--- python/trunk/Modules/_bsddb.c	(original)
+++ python/trunk/Modules/_bsddb.c	Sun Jun 18 00:38:15 2006
@@ -2721,6 +2721,8 @@
      */
     if (size == 0 && (flags & DB_FAST_STAT)) {
         flags = 0;
+        if (!err)
+            free(sp);
         goto redo_stat_for_length;
     }
 


More information about the Python-checkins mailing list