Mercurial > pidgin
changeset 12894:7dc00a9dfba5
[gaim-migrate @ 15247]
serv_got_chat_in will segfault on a NULL message, so let's make it check for NULL before calling strlen
committer: Tailor Script <tailor@pidgin.im>
author | Christopher O'Brien <siege@pidgin.im> |
---|---|
date | Mon, 16 Jan 2006 16:35:00 +0000 |
parents | 31e3c4f78aa4 |
children | a355472257f4 |
files | src/server.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server.c Mon Jan 16 10:24:49 2006 +0000 +++ b/src/server.c Mon Jan 16 16:35:00 2006 +0000 @@ -780,6 +780,9 @@ char *buffy, *angel; int plugin_return; + g_return_if_fail(who != NULL); + g_return_if_fail(message != NULL); + for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) { conv = (GaimConversation *)bcs->data; @@ -812,10 +815,8 @@ &angel, &buffy, conv, &flags)); if (!buffy || !angel || plugin_return) { - if (buffy) - g_free(buffy); - if (angel) - g_free(angel); + g_free(buffy); + g_free(angel); return; } who = angel;