Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to.

This commit is contained in:
Christian Heimes 2012-09-10 16:53:28 +02:00
commit 10e85ded9b
1 changed files with 1 additions and 0 deletions

View File

@ -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)) {