From: Neal Norwitz Date: Sat, 17 Jun 2006 22:38:15 +0000 (+0000) Subject: Fix memory leak reported by valgrind while running test_subprocess X-Git-Tag: v2.5b1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e75cad6125c45cbe7f81a3eb8d18a29866f6405a;p=thirdparty%2FPython%2Fcpython.git Fix memory leak reported by valgrind while running test_subprocess --- diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index d43d4aa6e8da..a88f01fffab2 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -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; }