aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/yahoo/libyahoo2.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-10-17 15:48:21 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2009-10-17 15:48:21 +0100
commit99c8f1357f1ab85f3a98727cb8877403d965e3da (patch)
tree0af79159117ebc7654a89783c6d6680b747bc293 /protocols/yahoo/libyahoo2.c
parente71cfbc35f3d2f3aa4da9e72776505d945429cbe (diff)
Valgrind pointed me at some memory leaks in the Yahoo! codek, including one
that existed for a while already. Fixed.
Diffstat (limited to 'protocols/yahoo/libyahoo2.c')
-rw-r--r--protocols/yahoo/libyahoo2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/yahoo/libyahoo2.c b/protocols/yahoo/libyahoo2.c
index 1d943df7..a1755cc9 100644
--- a/protocols/yahoo/libyahoo2.c
+++ b/protocols/yahoo/libyahoo2.c
@@ -2485,9 +2485,8 @@ static void yahoo_https_auth_finish(struct http_request *req)
yahoo_packet_free(pack);
- return;
-
fail:
+ g_free(crumb);
g_free(had->token);
g_free(had->chal);
g_free(had);
@@ -4134,7 +4133,10 @@ void yahoo_logoff(int id)
LOG(("yahoo_logoff: current status: %d", yd->current_status));
- if(yd->current_status != -1) {
+ if(yd->current_status != -1 && 0) {
+ /* Meh. Don't send this. The event handlers are not going to
+ get to do this so it'll just leak memory. And the TCP
+ connection reset will hopefully be clear enough. */
pkt = yahoo_packet_new(YAHOO_SERVICE_LOGOFF, YAHOO_STATUS_AVAILABLE, yd->session_id);
yd->current_status = -1;