diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-07-25 17:20:13 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-07-25 17:20:13 (GMT) |
commit | 7f18ac4a5962365a948d118176075e2ca045fdc7 (patch) | |
tree | e9869f48dfef9e5697d50469132428a2cb2d4695 | |
parent | 455a2a30a3743faa1819245d28a9fb46bd7c41a8 (diff) | |
download | cpython-7f18ac4a5962365a948d118176075e2ca045fdc7.zip cpython-7f18ac4a5962365a948d118176075e2ca045fdc7.tar.gz cpython-7f18ac4a5962365a948d118176075e2ca045fdc7.tar.bz2 |
possible memory leak in error case (closes #24719)
Patch by Pankaj Sharma.
-rw-r--r-- | Modules/cPickle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 10199eb..91f3ee7 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -2910,7 +2910,7 @@ Pickle_getvalue(Picklerobject *self, PyObject *args) if (ik >= lm || ik == 0) { PyErr_SetString(PicklingError, "Invalid get data"); - return NULL; + goto err; } have_get[ik] = 1; rsize += ik < 256 ? 2 : 5; |