mirror of https://github.com/python/cpython
Fix memory leaks spotted by Klocwork #37.
This commit is contained in:
parent
93f2ca1f85
commit
98a96004f9
|
@ -2637,7 +2637,7 @@ Pickle_getvalue(Picklerobject *self, PyObject *args)
|
|||
if (ik >= lm || ik == 0) {
|
||||
PyErr_SetString(PicklingError,
|
||||
"Invalid get data");
|
||||
return NULL;
|
||||
goto err;
|
||||
}
|
||||
if (have_get[ik]) /* with matching get */
|
||||
rsize += ik < 256 ? 2 : 5;
|
||||
|
@ -2649,7 +2649,7 @@ Pickle_getvalue(Picklerobject *self, PyObject *args)
|
|||
) {
|
||||
PyErr_SetString(PicklingError,
|
||||
"Unexpected data in internal list");
|
||||
return NULL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
else { /* put */
|
||||
|
|
Loading…
Reference in New Issue