summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-10-03 14:07:53 +0000
committerAndrew M. Kuchling <amk@amk.ca>2006-10-03 14:07:53 +0000
commit7828783f826c3b9cf2695178a1c8fbb4cf30ecdc (patch)
treeebc7ad93a8c1f886be9ab83e0dd8ac0e89912a4a /Modules
parent9569ea3425d63f0318f476ed8d3f835c517dd2bc (diff)
downloadcpython-git-7828783f826c3b9cf2695178a1c8fbb4cf30ecdc.tar.gz
[Backport rev. 47010 by neal.norwitz]
Fix memory leak reported by valgrind while running test_subprocess
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_bsddb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 586d580471..b2d4ef6ba1 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -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;
}