summaryrefslogtreecommitdiffstats
path: root/Modules/_bsddb.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-06-17 22:38:15 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-06-17 22:38:15 (GMT)
commite75cad6125c45cbe7f81a3eb8d18a29866f6405a (patch)
tree7ba2758dd4ee65b0d676134131dd0a0b32163e66 /Modules/_bsddb.c
parent210262c0ec0356dfa7e8f0778783e678e8075a04 (diff)
downloadcpython-e75cad6125c45cbe7f81a3eb8d18a29866f6405a.zip
cpython-e75cad6125c45cbe7f81a3eb8d18a29866f6405a.tar.gz
cpython-e75cad6125c45cbe7f81a3eb8d18a29866f6405a.tar.bz2
Fix memory leak reported by valgrind while running test_subprocess
Diffstat (limited to 'Modules/_bsddb.c')
-rw-r--r--Modules/_bsddb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index d43d4aa..a88f01f 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;
}