Mercurial > pidgin
diff libpurple/protocols/msn/command.c @ 31036:05e05d96ba75
Use the unref functions everywhere, instead of destroy. I also removed
some unnecessary checks in the destroy functions, since it's already
OK from the unref.
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Wed, 15 Dec 2010 23:10:13 +0000 |
| parents | 61db10475bed |
| children |
line wrap: on
line diff
--- a/libpurple/protocols/msn/command.c Wed Dec 15 22:21:07 2010 +0000 +++ b/libpurple/protocols/msn/command.c Wed Dec 15 23:10:13 2010 +0000 @@ -79,20 +79,10 @@ return cmd; } -void +static void msn_command_destroy(MsnCommand *cmd) { - g_return_if_fail(cmd != NULL); - - if (cmd->ref_count > 0) - { - msn_command_unref(cmd); - return; - } - - if (cmd->payload != NULL) - g_free(cmd->payload); - + g_free(cmd->payload); g_free(cmd->command); g_strfreev(cmd->params); g_free(cmd);
