From: Neal Norwitz Date: Sun, 23 Jul 2006 07:57:11 +0000 (+0000) Subject: Fix memory leaks spotted by Klocwork #37. X-Git-Tag: v2.5b3~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98a96004f97c1810831f74fc68ec2ccc4ec607c4;p=thirdparty%2FPython%2Fcpython.git Fix memory leaks spotted by Klocwork #37. --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 56f23351fb6f..9d979def8896 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -2637,7 +2637,7 @@ Pickle_getvalue(Picklerobject *self, PyObject *args) if (ik >= lm || ik == 0) { PyErr_SetString(PicklingError, "Invalid get data"); - return NULL; + goto err; } if (have_get[ik]) /* with matching get */ rsize += ik < 256 ? 2 : 5; @@ -2649,7 +2649,7 @@ Pickle_getvalue(Picklerobject *self, PyObject *args) ) { PyErr_SetString(PicklingError, "Unexpected data in internal list"); - return NULL; + goto err; } else { /* put */