Mercurial > pidgin
diff libpurple/protocols/msn/msn.c @ 20989:2097b1664fa3
Fix some leaks and prevent some unnecessary allocations and frees.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 18 Oct 2007 23:51:10 +0000 |
parents | 1ec2b67e9bc1 |
children | bc731b26335c |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Thu Oct 18 21:00:06 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Thu Oct 18 23:51:10 2007 +0000 @@ -254,6 +254,7 @@ trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %d", who, payload_len); msn_transaction_set_payload(trans, payload, payload_len); + g_free(payload); msn_page_destroy(page); @@ -1982,7 +1983,7 @@ purple_debug_info("MSNP14","photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)"); /* Marshall the existing state */ - info2_data = g_malloc0(sizeof(MsnGetInfoStepTwoData)); + info2_data = g_new0(MsnGetInfoStepTwoData, 1); info2_data->info_data = info_data; info2_data->stripped = stripped; info2_data->url_buffer = url_buffer;