summaryrefslogtreecommitdiff
path: root/src/plugins/trigger/trigger-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-02-10 17:50:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-02-10 17:50:24 +0100
commite9dbf23a18c6f23542a41764e5e31016e1e4a799 (patch)
tree60eef874f0c90fc14292be018c18823e3c47d73d /src/plugins/trigger/trigger-command.c
parentcaa51160dad483be2dfc323856e366331e9d0630 (diff)
downloadweechat-e9dbf23a18c6f23542a41764e5e31016e1e4a799.zip
trigger: fix memory leak when adding a new trigger with `/trigger` command
Diffstat (limited to 'src/plugins/trigger/trigger-command.c')
-rw-r--r--src/plugins/trigger/trigger-command.c10
1 files changed, 0 insertions, 10 deletions
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",