Fix reference leak in _pickle.

This commit is contained in:
Alexandre Vassalotti 2013-04-20 21:28:21 -07:00
parent 6b02772c13
commit 637c7c475a

View file

@ -5039,11 +5039,13 @@ do_append(UnpicklerObject *self, Py_ssize_t x)
if (result == NULL) {
Pdata_clear(self->stack, i + 1);
Py_SIZE(self->stack) = x;
Py_DECREF(append_func);
return -1;
}
Py_DECREF(result);
}
Py_SIZE(self->stack) = x;
Py_DECREF(append_func);
}
return 0;