1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

core: check that property is not NULL before calling free

This commit is contained in:
Sébastien Helleu
2023-08-29 09:52:17 +02:00
parent c5ceacd68f
commit 32f52ae236
+2 -1
View File
@@ -1272,7 +1272,8 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
property = string_strndup (pos + 1,
pos_open_paren - pos - 1);
ptr_value = hashtable_get_string (hashtable, property);
free (property);
if (property)
free (property);
value = (ptr_value) ? strdup (ptr_value) : NULL;
break;
}