summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-08-29 09:52:17 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-08-29 09:52:17 +0200
commit32f52ae23621e24d75de3cb5a3e3ab20677e5bcc (patch)
treed520700c7c62e2b2490c0600ce6a8272b4faf32d /src/core
parentc5ceacd68f0eaaf340df3195e3e3dd3089d6e372 (diff)
downloadweechat-32f52ae23621e24d75de3cb5a3e3ab20677e5bcc.zip
core: check that property is not NULL before calling free
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/wee-eval.c b/src/core/wee-eval.c
index 81b4bd875..512961d0c 100644
--- a/src/core/wee-eval.c
+++ b/src/core/wee-eval.c
@@ -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;
}