Mercurial > pidgin
diff libpurple/protocols/msn/notification.c @ 20935:1d9d5de48b9e
Fix some leaks.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 15 Oct 2007 00:31:34 +0000 |
parents | a3be7b2e335c |
children | cb5cbe04a340 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c Sun Oct 14 23:26:52 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Mon Oct 15 00:31:34 2007 +0000 @@ -262,14 +262,15 @@ for (cur = elems; *cur != NULL; cur++) { tokens = g_strsplit(*cur, "=", 2); - if(tokens[0]&&tokens[1]) + if(tokens[0] && tokens[1]) { purple_debug_info("MSNP14","challenge %p,key:%s,value:%s\n", session->nexus->challenge_data,tokens[0],tokens[1]); g_hash_table_insert(session->nexus->challenge_data, tokens[0], tokens[1]); - } - /* Don't free each of the tokens, only the array. */ - g_free(tokens); + /* Don't free each of the tokens, only the array. */ + g_free(tokens); + } else + g_strfreev(tokens); } g_strfreev(elems); @@ -735,7 +736,7 @@ msn_cmdproc_send_trans(cmdproc, trans); g_free(payload); - g_free(tokens); + g_strfreev(tokens); } static void