[Opensrf-commits] r1324 - trunk/src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 16 08:59:24 EDT 2008


Author: erickson
Date: 2008-05-16 08:59:23 -0400 (Fri, 16 May 2008)
New Revision: 1324

Modified:
   trunk/src/libopensrf/osrf_json_object.c
Log:
exiting early when hash iterator returns null

Modified: trunk/src/libopensrf/osrf_json_object.c
===================================================================
--- trunk/src/libopensrf/osrf_json_object.c	2008-05-16 12:45:11 UTC (rev 1323)
+++ trunk/src/libopensrf/osrf_json_object.c	2008-05-16 12:59:23 UTC (rev 1324)
@@ -361,6 +361,7 @@
 	if( itr->obj->type == JSON_HASH ) {
 		if(!itr->hashItr) return NULL;
 		jsonObject* item = osrfHashIteratorNext(itr->hashItr);
+        if(!item) return NULL;
 		free(itr->key);
 		itr->key = strdup( osrfHashIteratorKey(itr->hashItr) );
 		return item;



More information about the opensrf-commits mailing list