Commit 36000560 authored by Neal Norwitz's avatar Neal Norwitz

Prevent memory leak on error.

Reported by Klocwork #36
parent 3e32a1d1
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment