Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
20988:9375e1a9a196 | 20989:2097b1664fa3 |
---|---|
252 payload = msn_page_gen_payload(page, &payload_len); | 252 payload = msn_page_gen_payload(page, &payload_len); |
253 | 253 |
254 trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %d", who, payload_len); | 254 trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %d", who, payload_len); |
255 | 255 |
256 msn_transaction_set_payload(trans, payload, payload_len); | 256 msn_transaction_set_payload(trans, payload, payload_len); |
257 g_free(payload); | |
257 | 258 |
258 msn_page_destroy(page); | 259 msn_page_destroy(page); |
259 | 260 |
260 msn_cmdproc_send_trans(cmdproc, trans); | 261 msn_cmdproc_send_trans(cmdproc, trans); |
261 } | 262 } |
1980 /* Find the URL to the photo; must be before the marshalling [Bug 994207] */ | 1981 /* Find the URL to the photo; must be before the marshalling [Bug 994207] */ |
1981 photo_url_text = msn_get_photo_url(url_text); | 1982 photo_url_text = msn_get_photo_url(url_text); |
1982 purple_debug_info("MSNP14","photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)"); | 1983 purple_debug_info("MSNP14","photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)"); |
1983 | 1984 |
1984 /* Marshall the existing state */ | 1985 /* Marshall the existing state */ |
1985 info2_data = g_malloc0(sizeof(MsnGetInfoStepTwoData)); | 1986 info2_data = g_new0(MsnGetInfoStepTwoData, 1); |
1986 info2_data->info_data = info_data; | 1987 info2_data->info_data = info_data; |
1987 info2_data->stripped = stripped; | 1988 info2_data->stripped = stripped; |
1988 info2_data->url_buffer = url_buffer; | 1989 info2_data->url_buffer = url_buffer; |
1989 info2_data->user_info = user_info; | 1990 info2_data->user_info = user_info; |
1990 info2_data->photo_url_text = photo_url_text; | 1991 info2_data->photo_url_text = photo_url_text; |