mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
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
This commit is contained in:
@@ -3184,6 +3184,9 @@ string_shared_free (const char *string)
|
||||
{
|
||||
string_shared_count_t *ptr_count;
|
||||
|
||||
if (!string)
|
||||
return;
|
||||
|
||||
ptr_count = (string_shared_count_t *)(string - sizeof (string_shared_count_t));
|
||||
|
||||
(*ptr_count)--;
|
||||
|
||||
Reference in New Issue
Block a user