From 25f6151ce38d07cd85f68c3e881acdf8652f6dc1 Mon Sep 17 00:00:00 2001 From: dequis Date: Sat, 28 Nov 2015 18:09:27 -0300 Subject: set_eval_channel_type: skip the channel free/init if nothing is changed Fixes trac ticket 1108: https://bugs.bitlbee.org/bitlbee/ticket/1108 I would have ignored that ticket (it's about some sort of legacy migration) but the fix sounds like a sane thing to do --- irc_channel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc_channel.c b/irc_channel.c index 50fa14b3..6ba5a4d7 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -212,6 +212,11 @@ static char *set_eval_channel_type(set_t *set, char *value) return SET_INVALID; } + /* Skip the free/init if nothing is being changed */ + if (ic->f == new) { + return value; + } + /* TODO: Return values. */ if (ic->f && ic->f->_free) { ic->f->_free(ic); -- cgit v1.2.3