fix hash function return NULL

Signed-off-by: xiehuc <xiehuc@gmail.com>