Put extra check in hashtable_fetch to return if zero entries (should never happen but will crash if not checked); remove dcb_close from mysql_backend where it closes backend DCBs, as these should be closed by the router.

This commit is contained in:
counterpoint
2015-10-07 17:06:21 +01:00
parent 5c985b42ba
commit bb53eb0f6d
2 changed files with 14 additions and 3 deletions

View File

@ -379,7 +379,7 @@ hashtable_fetch(HASHTABLE *table, void *key)
unsigned int hashkey;
HASHENTRIES *entry;
if(table == NULL || key == NULL)
if(table == NULL || key == NULL || 0 == table->hashsize)
return NULL;
hashkey = table->hashfn(key) % table->hashsize;