diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/servers.c | 1 | ||||
-rw-r--r-- | src/fe-common/core/printtext.c | 3 | ||||
-rw-r--r-- | src/irc/bot/bot-events.c | 1 | ||||
-rw-r--r-- | src/irc/core/bans.c | 2 | ||||
-rw-r--r-- | src/irc/core/irc-servers.c | 1 | ||||
-rw-r--r-- | src/irc/notifylist/notifylist.c | 3 |
6 files changed, 10 insertions, 1 deletions
diff --git a/src/core/servers.c b/src/core/servers.c index cf1100a8..b2f619ca 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -245,6 +245,7 @@ int server_start_connect(SERVER_REC *server) if (pipe(server->connect_pipe) != 0) { g_warning("server_connect(): pipe() failed."); g_free(server->tag); + g_free(server->nick); return FALSE; } diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c index 6566bfa4..16ffe62c 100644 --- a/src/fe-common/core/printtext.c +++ b/src/fe-common/core/printtext.c @@ -940,6 +940,9 @@ void printtext_multiline(void *server, const char *channel, int level, const cha { char **lines, **tmp; + g_return_if_fail(format != NULL); + g_return_if_fail(text != NULL); + lines = g_strsplit(text, "\n", -1); for (tmp = lines; *tmp != NULL; tmp++) printtext(NULL, NULL, MSGLEVEL_NEVER, format, *tmp); diff --git a/src/irc/bot/bot-events.c b/src/irc/bot/bot-events.c index ffc403b1..5a7fd84d 100644 --- a/src/irc/bot/bot-events.c +++ b/src/irc/bot/bot-events.c @@ -109,6 +109,7 @@ static void parse_channel_mode(IRC_CHANNEL_REC *channel, const char *mode, return; } + /* check if unwanted people got ops */ str = g_string_new(NULL); dup = modestr = g_strdup(mode); diff --git a/src/irc/core/bans.c b/src/irc/core/bans.c index f6d68da4..d0a6b198 100644 --- a/src/irc/core/bans.c +++ b/src/irc/core/bans.c @@ -147,6 +147,8 @@ void ban_remove(IRC_CHANNEL_REC *channel, const char *bans) GSList *tmp; char **ban, **banlist; + g_return_if_fail(bans != NULL); + str = g_string_new(NULL); banlist = g_strsplit(bans, " ", -1); for (ban = banlist; *ban != NULL; ban++) { diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 9dfd7ae1..16e6ed40 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -131,7 +131,6 @@ IRC_SERVER_REC *irc_server_connect(IRC_SERVER_CONNECT_REC *conn) if (!server_start_connect((SERVER_REC *) server)) { server_connect_free(SERVER_CONNECT(conn)); - g_free(server->nick); g_free(server); return NULL; } diff --git a/src/irc/notifylist/notifylist.c b/src/irc/notifylist/notifylist.c index fc0c49f6..630df790 100644 --- a/src/irc/notifylist/notifylist.c +++ b/src/irc/notifylist/notifylist.c @@ -145,6 +145,9 @@ static IRC_SERVER_REC *notifylist_ison_serverlist(const char *nick, const char * IRC_SERVER_REC *server; char **list, **tmp; + g_return_val_if_fail(nick != NULL, NULL); + g_return_val_if_fail(taglist != NULL, NULL); + list = g_strsplit(taglist, " ", -1); server = NULL; |