summaryrefslogtreecommitdiff
path: root/src/plugins/xfer
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-25 19:01:56 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-26 08:53:22 +0200
commit0b2d9bcb9b04b7e7ac3c2f626422392383575d2b (patch)
tree177e487efc30717415402ba969b246de3f88b28d /src/plugins/xfer
parent1ad0b4b6699df50e0cc6a3c5d62ce3ac1f77440c (diff)
downloadweechat-0b2d9bcb9b04b7e7ac3c2f626422392383575d2b.zip
plugins: remove check of NULL pointers before calling weechat_hashtable_free() (issue #865)
Diffstat (limited to 'src/plugins/xfer')
-rw-r--r--src/plugins/xfer/xfer-buffer.c3
-rw-r--r--src/plugins/xfer/xfer-file.c3
-rw-r--r--src/plugins/xfer/xfer.c6
3 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/xfer/xfer-buffer.c b/src/plugins/xfer/xfer-buffer.c
index d01199486..1cf032ba9 100644
--- a/src/plugins/xfer/xfer-buffer.c
+++ b/src/plugins/xfer/xfer-buffer.c
@@ -367,6 +367,5 @@ xfer_buffer_open ()
&xfer_buffer_input_cb, NULL, NULL,
&xfer_buffer_close_cb, NULL, NULL);
- if (buffer_props)
- weechat_hashtable_free (buffer_props);
+ weechat_hashtable_free (buffer_props);
}
diff --git a/src/plugins/xfer/xfer-file.c b/src/plugins/xfer/xfer-file.c
index 6c39c69ae..8b42931a5 100644
--- a/src/plugins/xfer/xfer-file.c
+++ b/src/plugins/xfer/xfer-file.c
@@ -276,8 +276,7 @@ xfer_file_find_filename (struct t_xfer *xfer)
path = weechat_string_eval_path_home (
weechat_config_string (xfer_config_file_download_path),
NULL, NULL, options);
- if (options)
- weechat_hashtable_free (options);
+ weechat_hashtable_free (options);
if (!path)
return;
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index b0c437239..7f6fb9995 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -186,8 +186,7 @@ xfer_create_directories ()
free (path);
}
- if (options)
- weechat_hashtable_free (options);
+ weechat_hashtable_free (options);
}
/*
@@ -1110,8 +1109,7 @@ xfer_add_cb (const void *pointer, void *data,
path = weechat_string_eval_path_home (
weechat_config_string (xfer_config_file_upload_path),
NULL, NULL, options);
- if (options)
- weechat_hashtable_free (options);
+ weechat_hashtable_free (options);
if (!path)
{
weechat_printf (NULL,