1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

trigger: if hashmap creation failed, don't use tags

If hashmap creation fails (eg. not enough memory), it jumps to the label
"end", where it checks the pointer tags, that hadn't been initialized
before.

The simple fix is to initialize it before creating the hashmap.
This commit is contained in:
Neui
2017-06-10 08:24:34 +02:00
committed by Sébastien Helleu
parent 46b27bff4e
commit f962ba1c6c
+2 -2
View File
@@ -593,13 +593,13 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
TRIGGER_CALLBACK_CB_INIT(NULL);
TRIGGER_CALLBACK_CB_NEW_POINTERS;
buffer = NULL;
tags = NULL;
num_tags = 0;
string_no_color = NULL;
TRIGGER_CALLBACK_CB_NEW_POINTERS;
/* split IRC message (if string is an IRC message) */
if ((strncmp (modifier, "irc_in_", 7) == 0)
|| (strncmp (modifier, "irc_in2_", 8) == 0)