[Python-checkins] cpython (2.7): possible memory leak in error case (closes #24719)
benjamin.peterson
python-checkins at python.org
Sat Jul 25 19:20:31 CEST 2015
https://hg.python.org/cpython/rev/a789ee93f152
changeset: 97065:a789ee93f152
branch: 2.7
parent: 97052:7b5513e5afd2
user: Benjamin Peterson <benjamin at python.org>
date: Sat Jul 25 10:20:13 2015 -0700
summary:
possible memory leak in error case (closes #24719)
Patch by Pankaj Sharma.
files:
Modules/cPickle.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -2910,7 +2910,7 @@
if (ik >= lm || ik == 0) {
PyErr_SetString(PicklingError,
"Invalid get data");
- return NULL;
+ goto err;
}
have_get[ik] = 1;
rsize += ik < 256 ? 2 : 5;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list