And yet one more
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 06:04:22 +0000 (06:04 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 06:04:22 +0000 (06:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276911 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_jabber.c

index c7f586c..ecded13 100644 (file)
@@ -3649,7 +3649,7 @@ static int aji_delete_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_log(LOG_WARNING, "Connection: %s  Node name: %s\n", client->jid->partial,
@@ -3658,7 +3658,9 @@ static int aji_delete_node_list(void *data, ikspak* pak)
                        aji_delete_pubsub_node(client, iks_find_attrib(item, "node"));
                }
        }
-       iks_delete(item);
+       if (item) {
+               iks_delete(item);
+       }
        return IKS_FILTER_EAT;
 }