]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Backport rev. 47010 by neal.norwitz]
authorAndrew M. Kuchling <amk@amk.ca>
Tue, 3 Oct 2006 14:07:53 +0000 (14:07 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Tue, 3 Oct 2006 14:07:53 +0000 (14:07 +0000)
Fix memory leak reported by valgrind while running test_subprocess

Modules/_bsddb.c

index 586d58047110658e182baabaf3c7ba7be915a8e9..b2d4ef6ba1f5acf4b39dc2252b2becfd89c1523f 100644 (file)
@@ -2477,6 +2477,8 @@ redo_stat_for_length:
      */
     if (size == 0 && (flags & DB_FAST_STAT)) {
         flags = 0;
+        if (!err)
+            free(sp);
         goto redo_stat_for_length;
     }