diff options
| author | Christian Heimes <christian@cheimes.de> | 2012-09-10 16:53:28 +0200 |
|---|---|---|
| committer | Christian Heimes <christian@cheimes.de> | 2012-09-10 16:53:28 +0200 |
| commit | ff2214bba43d32efd78420004e03cfaf7cbfe092 (patch) | |
| tree | fc1ff85da74f734138c63d6f1489988c87217264 /Python/ast.c | |
| parent | f37856025a6ab42606d34d647c43c2903e962d85 (diff) | |
| parent | 6b8e6a6afd479892e11fa01c3df9879c47e03fe4 (diff) | |
| download | cpython-ff2214bba43d32efd78420004e03cfaf7cbfe092.tar.gz | |
Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to.
Diffstat (limited to 'Python/ast.c')
| -rw-r--r-- | Python/ast.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c index 43c18f4aa7..0c0c1a68d9 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3846,6 +3846,7 @@ parsestrplus(struct compiling *c, const node *n, int *bytesmode) goto onError; if (*bytesmode != subbm) { ast_error(c, n, "cannot mix bytes and nonbytes literals"); + Py_DECREF(s); goto onError; } if (PyBytes_Check(v) && PyBytes_Check(s)) { |
