Mercurial > pidgin.yaz
comparison libpurple/protocols/irc/msgs.c @ 22710:cd682b57b6e4
Use g_strdup to match the subsequent g_free.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 25 Apr 2008 16:08:48 +0000 |
parents | ef4ac2a83e1c |
children | 8d3c68a8eed4 |
comparison
equal
deleted
inserted
replaced
22709:1cd99421c696 | 22710:cd682b57b6e4 |
---|---|
713 g_free(nick); | 713 g_free(nick); |
714 g_hash_table_destroy(components); | 714 g_hash_table_destroy(components); |
715 return; | 715 return; |
716 } | 716 } |
717 | 717 |
718 g_hash_table_insert(components, strdup("channel"), strdup(args[1])); | 718 g_hash_table_insert(components, g_strdup("channel"), g_strdup(args[1])); |
719 | 719 |
720 serv_got_chat_invite(gc, args[1], nick, NULL, components); | 720 serv_got_chat_invite(gc, args[1], nick, NULL, components); |
721 g_free(nick); | 721 g_free(nick); |
722 } | 722 } |
723 | 723 |
978 char *newnick, *buf, *end; | 978 char *newnick, *buf, *end; |
979 | 979 |
980 if (!args || !args[1]) | 980 if (!args || !args[1]) |
981 return; | 981 return; |
982 | 982 |
983 newnick = strdup(args[1]); | 983 newnick = g_strdup(args[1]); |
984 end = newnick + strlen(newnick) - 1; | 984 end = newnick + strlen(newnick) - 1; |
985 /* try fallbacks */ | 985 /* try fallbacks */ |
986 if((*end < '9') && (*end >= '1')) { | 986 if((*end < '9') && (*end >= '1')) { |
987 *end = *end + 1; | 987 *end = *end + 1; |
988 } else *end = '1'; | 988 } else *end = '1'; |