- if (match_ircglobs(change->args[ii].u.hostmask, channel->banlist.list[jj]->ban)) {
- banList_remove(&channel->banlist, channel->banlist.list[jj]);
- free(channel->banlist.list[jj]);
+ bn = channel->banlist.list[jj];
+ if (match_ircglobs(change->args[ii].u.hostmask, bn->ban)) {
+ banList_remove(&channel->banlist, bn);
+ free(bn);