1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 01:03:14 +02:00

core: check that value is not NULL before calling free in hashtable_free_value

This commit is contained in:
Sebastien Helleu
2013-08-09 23:06:41 +02:00
parent abb574ec4e
commit e407c41c5c
+2 -1
View File
@@ -336,7 +336,8 @@ hashtable_free_value (struct t_hashtable *hashtable,
case HASHTABLE_STRING:
case HASHTABLE_BUFFER:
case HASHTABLE_TIME:
free (item->value);
if (item->value)
free (item->value);
break;
case HASHTABLE_POINTER:
break;