summaryrefslogtreecommitdiff
path: root/src/core/wee-hdata.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:01:50 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:01:50 +0100
commit0d059add9aa4debf47e58af1ef6a6a5e72e3a1ac (patch)
tree356cf8fcaca39f978fb525f7c93a324e5391aafb /src/core/wee-hdata.c
parenteebb0547e2f2431efaf1adce2a39dd4f5fc8909f (diff)
downloadweechat-0d059add9aa4debf47e58af1ef6a6a5e72e3a1ac.zip
core: check that pointers received in arguments are not NULL in "free" functions
Functions: - hdata_free - infolist_var_free - infolist_item_free - infolist_free - string_shared_free - gui_window_objects_free - gui_color_free - gui_completion_free - gui_filter_free - gui_history_buffer_free - gui_hotlist_free - gui_key_free - gui_lines_free - gui_line_tags_free - gui_line_free - gui_window_tree_free - gui_window_scroll_free
Diffstat (limited to 'src/core/wee-hdata.c')
-rw-r--r--src/core/wee-hdata.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-hdata.c b/src/core/wee-hdata.c
index f6fa214a1..be5bc4d6a 100644
--- a/src/core/wee-hdata.c
+++ b/src/core/wee-hdata.c
@@ -1062,6 +1062,9 @@ hdata_get_string (struct t_hdata *hdata, const char *property)
void
hdata_free (struct t_hdata *hdata)
{
+ if (!hdata)
+ return;
+
if (hdata->hash_var)
hashtable_free (hdata->hash_var);
if (hdata->var_prev)