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

irc: free account before changing its value

This commit is contained in:
Sébastien Helleu
2015-01-25 17:33:03 +01:00
parent 5559b43518
commit b1a1e14832
+5 -4
View File
@@ -4303,10 +4303,11 @@ IRC_PROTOCOL_CALLBACK(354)
}
/* update account flag for nick */
if (ptr_channel && ptr_nick && pos_account && server->cap_account_notify)
ptr_nick->account = (pos_account) ? strdup (pos_account) : strdup ("*");
else
ptr_nick->account = strdup ("*");
if (ptr_nick->account)
free (ptr_nick->account);
ptr_nick->account = (ptr_channel && ptr_nick && pos_account
&& server->cap_account_notify) ?
strdup (pos_account) : strdup ("*");
/* display output of who (manual who from user) */
if (!ptr_channel || (ptr_channel->checking_whox <= 0))