summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-02-18 21:04:21 +0100
committerSébastien Helleu <flashcode@flashtux.org>2020-02-18 21:04:21 +0100
commit6daa09b0b8b59d8f06fe8e81ff655e926fc9591d (patch)
tree59235435c1ce019e7b6528fe562247e63f98bf8c /src
parentc6e9e18aaae175dd69bba9a579a53586e33bc90c (diff)
downloadweechat-6daa09b0b8b59d8f06fe8e81ff655e926fc9591d.zip
script: fix memory leak in read of script repository file if it has invalid content
Diffstat (limited to 'src')
-rw-r--r--src/plugins/script/script-repo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c
index 892324712..2e42c2f49 100644
--- a/src/plugins/script/script-repo.c
+++ b/src/plugins/script/script-repo.c
@@ -1241,6 +1241,8 @@ script_repo_file_read (int quiet)
{
if (strstr (ptr_line, "<plugin id="))
{
+ if (script)
+ script_repo_free (script);
script = script_repo_alloc ();
weechat_hashtable_remove_all (descriptions);
}