diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 9d979def889..24c98ccb225 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -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: