Prevent memory leak on error.

Reported by Klocwork #36
This commit is contained in:
Neal Norwitz 2006-08-02 04:27:11 +00:00
parent 62decc9f49
commit 99dfe3c411
1 changed files with 1 additions and 1 deletions

View File

@ -3401,11 +3401,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: