diff options
author | Christian Heimes <christian@cheimes.de> | 2012-09-10 16:52:42 +0200 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2012-09-10 16:52:42 +0200 |
commit | 6b8e6a6afd479892e11fa01c3df9879c47e03fe4 (patch) | |
tree | bfb8ba149a3a4c425728d61ebf5deede50f5be2f /Python/ast.c | |
parent | e193a7ded240773a2e827675085a8bbea241d04f (diff) | |
download | cpython-6b8e6a6afd479892e11fa01c3df9879c47e03fe4.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 4ae9d75d03..d2f063bb5b 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3395,6 +3395,7 @@ parsestrplus(struct compiling *c, const node *n, int *bytesmode) 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)) { |