diff --git a/src/core/channels.c b/src/core/channels.c index 08142f8b..79d8f0e7 100644 --- a/src/core/channels.c +++ b/src/core/channels.c @@ -89,6 +89,7 @@ void channel_destroy(CHANNEL_REC *channel) g_free_not_null(channel->key); g_free(channel->mode); g_free(channel->name); + g_free(channel->visible_name); channel->type = 0; g_free(channel); diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c index f5c54932..9e2c4891 100644 --- a/src/irc/core/channel-events.c +++ b/src/irc/core/channel-events.c @@ -148,7 +148,8 @@ static void channel_change_topic(IRC_SERVER_REC *server, const char *channel, g_free_not_null(chanrec->topic); chanrec->topic = recoded == NULL ? NULL : g_strdup(recoded); } - + g_free(recoded); + g_free_not_null(chanrec->topic_by); chanrec->topic_by = g_strdup(setby); diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 7f05314f..5733db14 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -373,11 +373,13 @@ char *perl_script_get_path(const char *name) /* check from SCRIPTDIR */ g_free(path); path = g_strdup_printf(SCRIPTDIR"/%s", file); - if (stat(path, &statbuf) != 0) - path = NULL; + if (stat(path, &statbuf) != 0) { + g_free(path); + path = NULL; + } } g_free(file); - return path; + return path; } /* If core should handle printing script errors */