mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
5abd76a75d
commit
3d463393bb
1 changed files with 1 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue