changeset 28297:208fbf27d987

Fix a couple of possible null-pointer dereferences. Thanks to clang-analyzer (http://clang-analyzer.llvm.org/)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 26 Sep 2009 17:34:10 +0000
parents a07e46f20644
children 60e4ef6801ff
files libpurple/protocols/yahoo/yahoo_filexfer.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Sat Sep 26 17:05:37 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Sat Sep 26 17:34:10 2009 +0000
@@ -1363,7 +1363,6 @@
 
 	xfer = data;
 	if (!(xd = xfer->data))	{
-		purple_input_remove(xd->input_event);
 		purple_xfer_cancel_remote(xfer);
 		return;
 	}
@@ -1387,7 +1386,6 @@
 
 	xfer = data;
 	if (!(xd = xfer->data))	{
-		purple_input_remove(xd->input_event);
 		purple_xfer_cancel_remote(xfer);
 		return;
 	}
@@ -1491,7 +1489,7 @@
 	char *filename_without_spaces = NULL;
 
 	xfer = data;
-	if ( !( (xd = xfer->data) || (listenfd != -1) ) )	{
+	if (!(xd = xfer->data) || (listenfd == -1))	{
 		purple_debug_warning("yahoo","p2p: error starting server for p2p file transfer\n");
 		purple_xfer_cancel_remote(xfer);
 		return;