From e75cad6125c45cbe7f81a3eb8d18a29866f6405a Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 17 Jun 2006 22:38:15 +0000 Subject: [PATCH] Fix memory leak reported by valgrind while running test_subprocess --- Modules/_bsddb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index d43d4aa6e8d..a88f01fffab 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; }