mirror of
https://github.com/irssi/irssi.git
synced 2026-08-15 14:42:08 +02:00
Fixed a memory leak and a crash when notifylist_check_join() was called with NULL realname.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2185 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
aa3513eaaf
commit
84abc35a81
2 changed files with 4 additions and 3 deletions
|
|
@ -232,6 +232,8 @@ void notifylist_left(IRC_SERVER_REC *server, NOTIFY_NICK_REC *rec)
|
|||
rec->user, rec->host,
|
||||
rec->realname, rec->awaymsg);
|
||||
}
|
||||
|
||||
notify_nick_destroy(rec);
|
||||
}
|
||||
|
||||
static void notifylist_idle_reset(IRC_SERVER_REC *server, const char *nick)
|
||||
|
|
@ -297,7 +299,7 @@ static void notifylist_check_join(IRC_SERVER_REC *server, const char *nick,
|
|||
g_free_not_null(rec->realname);
|
||||
rec->user = g_strdup(user);
|
||||
rec->host = g_strdup(host);
|
||||
rec->realname = *realname == '\0' ? NULL : g_strdup(realname);
|
||||
rec->realname = realname == NULL || *realname == '\0' ? NULL : g_strdup(realname);
|
||||
|
||||
if (away != -1) rec->away = away;
|
||||
rec->host_ok = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue