/pidgin/main: 0df6c9663ff7: Coverity: fix theoretical NULL deref...

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu May 22 07:44:59 EDT 2014


Changeset: 0df6c9663ff7dd499ec46587b7e477f0c51dbbee
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-22 13:44 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/0df6c9663ff7

Description:

Coverity: fix theoretical NULL dereference

diffstat:

 libpurple/protocols/bonjour/jabber.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff --git a/libpurple/protocols/bonjour/jabber.c b/libpurple/protocols/bonjour/jabber.c
--- a/libpurple/protocols/bonjour/jabber.c
+++ b/libpurple/protocols/bonjour/jabber.c
@@ -1153,7 +1153,10 @@ bonjour_jabber_close_conversation(Bonjou
 		PURPLE_ASSERT_CONNECTION_IS_VALID(pc);
 
 		bd = purple_connection_get_protocol_data(pc);
-		bd->jabber_data->pending_conversations = g_slist_remove(bd->jabber_data->pending_conversations, bconv);
+		if (bd) {
+			bd->jabber_data->pending_conversations = g_slist_remove(
+				bd->jabber_data->pending_conversations, bconv);
+		}
 
 		/* Cancel any file transfers that are waiting to begin */
 		/* There wont be any transfers if it hasn't been attached to a buddy */



More information about the Commits mailing list