From 4a6bdc1c9cd2fd2d5cedc934ab96efc56b329b2c Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 9 Jan 2014 15:34:30 +0100 Subject: [PATCH] relay: fix memory leak on unload of relay plugin --- ChangeLog | 1 + src/plugins/relay/relay-config.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index ad383b65b..4de416145 100644 --- a/ChangeLog +++ b/ChangeLog @@ -96,6 +96,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] message (task #12777) * lua: fix crash on calls to callbacks during load of script * python: fix load of scripts with python >= 3.3 +* relay: fix memory leak on unload of relay plugin * ruby: fix ruby init with ruby >= 2.0 (bug #41115) * xfer: add support of IPv6 for DCC chat/file (patch #7992) * xfer: use same infolist for hook and signals (patch #7974) diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index d33fbe486..7b60bc40e 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -760,6 +760,13 @@ relay_config_free () relay_config_regex_allowed_ips = NULL; } + if (relay_config_regex_websocket_allowed_origins) + { + regfree (relay_config_regex_websocket_allowed_origins); + free (relay_config_regex_websocket_allowed_origins); + relay_config_regex_websocket_allowed_origins = NULL; + } + if (relay_config_hashtable_irc_backlog_tags) { weechat_hashtable_free (relay_config_hashtable_irc_backlog_tags);