[Opensrf-commits] r1727 - trunk/src/libopensrf (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jul 22 22:03:40 EDT 2009


Author: erickson
Date: 2009-07-22 22:03:38 -0400 (Wed, 22 Jul 2009)
New Revision: 1727

Modified:
   trunk/src/libopensrf/osrf_hash.c
Log:
check NULL-ness on hash the key before calling find_item

Modified: trunk/src/libopensrf/osrf_hash.c
===================================================================
--- trunk/src/libopensrf/osrf_hash.c	2009-07-22 03:50:13 UTC (rev 1726)
+++ trunk/src/libopensrf/osrf_hash.c	2009-07-23 02:03:38 UTC (rev 1727)
@@ -253,6 +253,7 @@
 
 
 void* osrfHashGet( osrfHash* hash, const char* key ) {
+	if(!(hash && key )) return NULL;
 	osrfHashNode* node = find_item( hash, key, NULL );
 	if( !node ) return NULL;
 	return node->item;



More information about the opensrf-commits mailing list