[asterisk-commits] tilghman: trunk r276910 - /trunk/res/res_jabber.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 16 00:59:15 CDT 2010


Author: tilghman
Date: Fri Jul 16 00:59:11 2010
New Revision: 276910

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276910
Log:
"Item may be used uninitialized in this function."

Modified:
    trunk/res/res_jabber.c

Modified: trunk/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_jabber.c?view=diff&rev=276910&r1=276909&r2=276910
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Fri Jul 16 00:59:11 2010
@@ -3525,7 +3525,7 @@
 {
 
 	struct aji_client *client = ASTOBJ_REF((struct aji_client *) data);
-	iks *item;
+	iks *item = NULL;
 	if (iks_has_children(pak->query)) {
 		item = iks_first_tag(pak->query);
 		ast_verbose("Connection: %s\nNode name: %s\n", client->jid->partial,
@@ -3534,7 +3534,9 @@
 			ast_verbose("Node name: %s\n", iks_find_attrib(item, "node"));
 		}
 	}
-	iks_delete(item);
+	if (item) {
+		iks_delete(item);
+	}
 	return IKS_FILTER_EAT;
 }
 




More information about the asterisk-commits mailing list