[Python-checkins] r51033 - python/trunk/Modules/cPickle.c
neal.norwitz
python-checkins at python.org
Wed Aug 2 06:27:21 CEST 2006
Author: neal.norwitz
Date: Wed Aug 2 06:27:11 2006
New Revision: 51033
Modified:
python/trunk/Modules/cPickle.c
Log:
Prevent memory leak on error.
Reported by Klocwork #36
Modified: python/trunk/Modules/cPickle.c
==============================================================================
--- python/trunk/Modules/cPickle.c (original)
+++ python/trunk/Modules/cPickle.c Wed Aug 2 06:27:11 2006
@@ -3401,11 +3401,11 @@
/********************************************/
str = PyString_DecodeEscape(p, len, NULL, 0, NULL);
+ free(s);
if (str) {
PDATA_PUSH(self->stack, str, -1);
res = 0;
}
- free(s);
return res;
insecure:
More information about the Python-checkins
mailing list