diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/plugins/trigger/trigger-command.c | 10 |
2 files changed, 1 insertions, 10 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index f536b11d3..0c6067ed7 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -27,6 +27,7 @@ Bug fixes:: * core: remove trailing directory separators in home directories (issue #2070) * irc: fix random date displayed when a received message contains tags but no "time" (issue #2064) * scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067) + * trigger: fix memory leak when adding a new trigger with `/trigger` command [[v4.2.1]] == Version 4.2.1 (2024-01-22) diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c index 46cc69c16..504697591 100644 --- a/src/plugins/trigger/trigger-command.c +++ b/src/plugins/trigger/trigger-command.c @@ -773,16 +773,6 @@ trigger_command_trigger (const void *pointer, void *data, goto end; } } - ptr_trigger = trigger_alloc (sargv[0]); - if (!ptr_trigger) - { - weechat_printf_date_tags ( - NULL, 0, "no_trigger", - _("%s%s: failed to create trigger \"%s\""), - weechat_prefix ("error"), TRIGGER_PLUGIN_NAME, - sargv[0]); - goto end; - } ptr_trigger = trigger_new ( sargv[0], /* name */ (weechat_strcmp (argv[1], "addoff") == 0) ? "off" : "on", |