diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 00:18:30 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 20:59:25 +0200 |
commit | e73bff95fa4bcc0902b65263bd47ec8bdc0c1128 (patch) | |
tree | d08516ff949e2b7427e8014e5424793540195bf3 /src/gui/gui-bar-item-custom.c | |
parent | b56b34711dfb3bacee31265e4aa28f3c1d2a7bab (diff) | |
download | weechat-e73bff95fa4bcc0902b65263bd47ec8bdc0c1128.zip |
core: remove check of NULL pointers before calling free() (issue #865)
Diffstat (limited to 'src/gui/gui-bar-item-custom.c')
-rw-r--r-- | src/gui/gui-bar-item-custom.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/gui-bar-item-custom.c b/src/gui/gui-bar-item-custom.c index 15b217f63..206eb96b5 100644 --- a/src/gui/gui-bar-item-custom.c +++ b/src/gui/gui-bar-item-custom.c @@ -611,8 +611,7 @@ gui_bar_item_custom_free_data (struct t_gui_bar_item_custom *item) { int i; - if (item->name) - free (item->name); + free (item->name); for (i = 0; i < GUI_BAR_ITEM_CUSTOM_NUM_OPTIONS; i++) { if (item->options[i]) @@ -654,8 +653,7 @@ gui_bar_item_custom_free (struct t_gui_bar_item_custom *item) gui_bar_item_update (name); - if (name) - free (name); + free (name); } /* |