]> granicus.if.org Git - python/commitdiff
Fix memory leak reported by valgrind while running test_subprocess
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 17 Jun 2006 22:38:15 +0000 (22:38 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 17 Jun 2006 22:38:15 +0000 (22:38 +0000)
Modules/_bsddb.c

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