From fd57e670748d65f73cb80c1ad1bab9ca0fc4450c Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 23 Jul 2009 02:03:38 +0000 Subject: [PATCH] check NULL-ness on hash the key before calling find_item git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1727 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libopensrf/osrf_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libopensrf/osrf_hash.c b/src/libopensrf/osrf_hash.c index 377d595..c00df90 100644 --- a/src/libopensrf/osrf_hash.c +++ b/src/libopensrf/osrf_hash.c @@ -253,6 +253,7 @@ void* osrfHashRemove( osrfHash* hash, const char* key, ... ) { 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; -- 2.11.0