From f43ed913f577fc0f7a60cbed45ee7b2a04fe5818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 12 Sep 2023 13:38:14 +0200 Subject: [PATCH] xfer: fix memory leak on plugin unload --- ChangeLog.adoc | 1 + src/plugins/xfer/xfer-config.h | 2 +- src/plugins/xfer/xfer.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 2a2a34b67..79d8ab6d0 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -23,6 +23,7 @@ Bug fixes:: * irc: fix autojoin of channels when private buffers are opened (issue #2012) * irc: fix string comparison when CASEMAPPING is set to "ascii" * script: fix crash when a `/script` command triggers another `/script` command (issue #923) + * xfer: fix memory leak on plugin unload Tests:: diff --git a/src/plugins/xfer/xfer-config.h b/src/plugins/xfer/xfer-config.h index d22807b51..995ecb82c 100644 --- a/src/plugins/xfer/xfer-config.h +++ b/src/plugins/xfer/xfer-config.h @@ -25,7 +25,7 @@ #define XFER_CONFIG_PROGRESS_BAR_MAX_SIZE 256 -extern struct t_config_file *xfer_config; +extern struct t_config_file *xfer_config_file; extern struct t_config_option *xfer_config_look_auto_open_buffer; extern struct t_config_option *xfer_config_look_progress_bar_size; diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 01297e47d..c03d928d3 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1842,5 +1842,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) xfer_free_all (); + weechat_config_free (xfer_config_file); + return WEECHAT_RC_OK; }