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

Tomasz Wasilczyk <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 0df6c9663ff7dd499ec46587b7e477f0c51dbbee
Author:	 Tomasz Wasilczyk <[email protected]>
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 */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.