Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/presence.c @ 17840:6e0961356343
Don't check for null before calling free. I can't help but get rid
of these when I see them.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 12 Jun 2007 07:30:24 +0000 |
parents | d495103dcf88 |
children | 641db7354235 |
comparison
equal
deleted
inserted
replaced
17839:9f7eabc5e42d | 17840:6e0961356343 |
---|---|
377 } | 377 } |
378 } | 378 } |
379 } else if(xmlns && !strcmp(xmlns, "vcard-temp:x:update")) { | 379 } else if(xmlns && !strcmp(xmlns, "vcard-temp:x:update")) { |
380 xmlnode *photo = xmlnode_get_child(y, "photo"); | 380 xmlnode *photo = xmlnode_get_child(y, "photo"); |
381 if(photo) { | 381 if(photo) { |
382 if(avatar_hash) | 382 g_free(avatar_hash); |
383 g_free(avatar_hash); | |
384 avatar_hash = xmlnode_get_data(photo); | 383 avatar_hash = xmlnode_get_data(photo); |
385 } | 384 } |
386 } | 385 } |
387 } | 386 } |
388 } | 387 } |
407 | 406 |
408 jabber_chat_destroy(chat); | 407 jabber_chat_destroy(chat); |
409 jabber_id_free(jid); | 408 jabber_id_free(jid); |
410 g_free(status); | 409 g_free(status); |
411 g_free(room_jid); | 410 g_free(room_jid); |
412 if(avatar_hash) | 411 g_free(avatar_hash); |
413 g_free(avatar_hash); | |
414 return; | 412 return; |
415 } | 413 } |
416 | 414 |
417 | 415 |
418 if(type && !strcmp(type, "unavailable")) { | 416 if(type && !strcmp(type, "unavailable")) { |
424 if(jid->resource && chat->handle && !strcmp(jid->resource, chat->handle)) | 422 if(jid->resource && chat->handle && !strcmp(jid->resource, chat->handle)) |
425 jabber_chat_destroy(chat); | 423 jabber_chat_destroy(chat); |
426 jabber_id_free(jid); | 424 jabber_id_free(jid); |
427 g_free(status); | 425 g_free(status); |
428 g_free(room_jid); | 426 g_free(room_jid); |
429 if(avatar_hash) | 427 g_free(avatar_hash); |
430 g_free(avatar_hash); | |
431 return; | 428 return; |
432 } | 429 } |
433 | 430 |
434 jabber_buddy_remove_resource(jb, jid->resource); | 431 jabber_buddy_remove_resource(jb, jid->resource); |
435 if(chat->muc) { | 432 if(chat->muc) { |
566 } | 563 } |
567 g_free(buddy_name); | 564 g_free(buddy_name); |
568 } | 565 } |
569 g_free(status); | 566 g_free(status); |
570 jabber_id_free(jid); | 567 jabber_id_free(jid); |
571 if(avatar_hash) | 568 g_free(avatar_hash); |
572 g_free(avatar_hash); | |
573 } | 569 } |
574 | 570 |
575 void jabber_presence_subscription_set(JabberStream *js, const char *who, const char *type) | 571 void jabber_presence_subscription_set(JabberStream *js, const char *who, const char *type) |
576 { | 572 { |
577 xmlnode *presence = xmlnode_new("presence"); | 573 xmlnode *presence = xmlnode_new("presence"); |