From 98a96004f97c1810831f74fc68ec2ccc4ec607c4 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 23 Jul 2006 07:57:11 +0000 Subject: Fix memory leaks spotted by Klocwork #37. --- Modules/cPickle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 56f2335..9d979de 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 */ -- cgit v0.12