[Python-checkins] r52110 - python/branches/release24-maint/Modules/cPickle.c

andrew.kuchling python-checkins at python.org
Tue Oct 3 20:55:07 CEST 2006


Author: andrew.kuchling
Date: Tue Oct  3 20:55:06 2006
New Revision: 52110

Modified:
   python/branches/release24-maint/Modules/cPickle.c
Log:
[Backport r50781 | neal.norwitz]

Fix memory leaks spotted by Klocwork #37.


Modified: python/branches/release24-maint/Modules/cPickle.c
==============================================================================
--- python/branches/release24-maint/Modules/cPickle.c	(original)
+++ python/branches/release24-maint/Modules/cPickle.c	Tue Oct  3 20:55:06 2006
@@ -2620,7 +2620,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;
@@ -2632,7 +2632,7 @@
 			) {
 			PyErr_SetString(PicklingError,
 					"Unexpected data in internal list");
-			return NULL;
+			goto err;
 		}
 
 		else { /* put */


More information about the Python-checkins mailing list