Mercurial > pidgin
comparison src/protocols/msn/httpconn.c @ 13630:bbc56ff2bd62
[gaim-migrate @ 16017]
Leak fix.
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Wed, 12 Apr 2006 01:51:57 +0000 |
| parents | 4279e5b5e9ac |
| children | 967ef719cb62 |
comparison
equal
deleted
inserted
replaced
| 13629:3275a0f675e2 | 13630:bbc56ff2bd62 |
|---|---|
| 327 httpconn->inpa = 0; | 327 httpconn->inpa = 0; |
| 328 } | 328 } |
| 329 | 329 |
| 330 close(httpconn->fd); | 330 close(httpconn->fd); |
| 331 | 331 |
| 332 g_free(httpconn->rx_buf); | |
| 332 httpconn->rx_buf = NULL; | 333 httpconn->rx_buf = NULL; |
| 333 httpconn->rx_len = 0; | 334 httpconn->rx_len = 0; |
| 334 | 335 |
| 335 httpconn->connected = FALSE; | 336 httpconn->connected = FALSE; |
| 336 | 337 |
| 392 msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_READ); | 393 msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_READ); |
| 393 | 394 |
| 394 return; | 395 return; |
| 395 } | 396 } |
| 396 | 397 |
| 397 if (httpconn->rx_buf != NULL) | 398 g_free(httpconn->rx_buf); |
| 398 g_free(httpconn->rx_buf); | |
| 399 httpconn->rx_buf = NULL; | 399 httpconn->rx_buf = NULL; |
| 400 httpconn->rx_len = 0; | 400 httpconn->rx_len = 0; |
| 401 | 401 |
| 402 if (result_len == 0) | 402 if (result_len == 0) |
| 403 { | 403 { |
| 731 t = strchr(full_session_id, '.'); | 731 t = strchr(full_session_id, '.'); |
| 732 session_id = g_strndup(full_session_id, t - full_session_id); | 732 session_id = g_strndup(full_session_id, t - full_session_id); |
| 733 | 733 |
| 734 if (!wasted) | 734 if (!wasted) |
| 735 { | 735 { |
| 736 if (httpconn->full_session_id != NULL) | 736 g_free(httpconn->full_session_id); |
| 737 g_free(httpconn->full_session_id); | |
| 738 | 737 |
| 739 httpconn->full_session_id = full_session_id; | 738 httpconn->full_session_id = full_session_id; |
| 740 | 739 |
| 741 if (httpconn->session_id != NULL) | 740 g_free(httpconn->session_id); |
| 742 g_free(httpconn->session_id); | |
| 743 | 741 |
| 744 httpconn->session_id = session_id; | 742 httpconn->session_id = session_id; |
| 745 | 743 |
| 746 if (httpconn->host != NULL) | 744 g_free(httpconn->host); |
| 747 g_free(httpconn->host); | |
| 748 | 745 |
| 749 httpconn->host = gw_ip; | 746 httpconn->host = gw_ip; |
| 750 } | 747 } |
| 751 else | 748 else |
| 752 { | 749 { |
