diff options
author | Joseph Bisch <joseph.bisch@gmail.com> | 2017-10-08 22:02:44 -0400 |
---|---|---|
committer | Joseph Bisch <joseph.bisch@gmail.com> | 2017-10-08 22:02:44 -0400 |
commit | 2edd816e7db13b4ac0b20df9bf7fe55ee7718215 (patch) | |
tree | de14490943e1f522bc6f2eccfddbc2ef2283518d /src | |
parent | 49ace3251b79a9e97c6e4d0bc640f9143dc71b90 (diff) | |
download | irssi-2edd816e7db13b4ac0b20df9bf7fe55ee7718215.zip |
Fix segfault in query_remove_all
It is possible for rec to be NULL in query_remove_all, resulting in a
segfault. So return without doing anything if rec is NULL.
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/channels-query.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c index d161aec1..d7dadf04 100644 --- a/src/irc/core/channels-query.c +++ b/src/irc/core/channels-query.c @@ -119,6 +119,7 @@ static void query_remove_all(IRC_CHANNEL_REC *channel) int n; rec = channel->server->chanqueries; + if (rec == NULL) return; /* remove channel from query lists */ for (n = 0; n < CHANNEL_QUERIES; n++) |