"Item may be used uninitialized in this function."
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 05:59:11 +0000 (05:59 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 05:59:11 +0000 (05:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276910 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_jabber.c

index d79820f..c7f586c 100644 (file)
@@ -3525,7 +3525,7 @@ static int aji_receive_node_list(void *data, ikspak* pak)
 {
 
        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 @@ static int aji_receive_node_list(void *data, ikspak* pak)
                        ast_verbose("Node name: %s\n", iks_find_attrib(item, "node"));
                }
        }
-       iks_delete(item);
+       if (item) {
+               iks_delete(item);
+       }
        return IKS_FILTER_EAT;
 }