[Python-checkins] cpython (3.2): Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going
christian.heimes
python-checkins at python.org
Mon Sep 10 16:54:14 CEST 2012
http://hg.python.org/cpython/rev/4a343636c8ca
changeset: 78962:4a343636c8ca
branch: 3.2
parent: 78959:d012f645b8b2
user: Christian Heimes <christian at cheimes.de>
date: Mon Sep 10 16:52:42 2012 +0200
summary:
Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to.
files:
Python/ast.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3395,6 +3395,7 @@
goto onError;
if (*bytesmode != subbm) {
ast_error(n, "cannot mix bytes and nonbytes literals");
+ Py_DECREF(s);
goto onError;
}
if (PyBytes_Check(v) && PyBytes_Check(s)) {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list