[Python-checkins] r50781 - python/trunk/Modules/cPickle.c

neal.norwitz python-checkins at python.org
Sun Jul 23 09:57:11 CEST 2006


Author: neal.norwitz
Date: Sun Jul 23 09:57:11 2006
New Revision: 50781

Modified:
   python/trunk/Modules/cPickle.c
Log:
Fix memory leaks spotted by Klocwork #37.


Modified: python/trunk/Modules/cPickle.c
==============================================================================
--- python/trunk/Modules/cPickle.c	(original)
+++ python/trunk/Modules/cPickle.c	Sun Jul 23 09:57:11 2006
@@ -2637,7 +2637,7 @@
 			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 @@
 			) {
 			PyErr_SetString(PicklingError,
 					"Unexpected data in internal list");
-			return NULL;
+			goto err;
 		}
 
 		else { /* put */


More information about the Python-checkins mailing list