diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:57:11 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:57:11 (GMT) |
commit | 98a96004f97c1810831f74fc68ec2ccc4ec607c4 (patch) | |
tree | 97f88bf114104b0e9cf1db5507932e9d92106541 /Modules | |
parent | 93f2ca1f85a80deeb4990540b54ca693843e2e22 (diff) | |
download | cpython-98a96004f97c1810831f74fc68ec2ccc4ec607c4.zip cpython-98a96004f97c1810831f74fc68ec2ccc4ec607c4.tar.gz cpython-98a96004f97c1810831f74fc68ec2ccc4ec607c4.tar.bz2 |
Fix memory leaks spotted by Klocwork #37.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cPickle.c | 4 |
1 files 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 */ |