[Backport r51033 | neal.norwitz]

Prevent memory leak on error.

Reported by Klocwork #36
This commit is contained in:
Andrew M. Kuchling
2006-10-03 19:30:04 +00:00
parent cc17b6f005
commit 99868849e7

View File

@@ -3394,11 +3394,11 @@ load_string(Unpicklerobject *self)
/********************************************/
str = PyString_DecodeEscape(p, len, NULL, 0, NULL);
free(s);
if (str) {
PDATA_PUSH(self->stack, str, -1);
res = 0;
}
free(s);
return res;
insecure: