]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix crash in res_xmpp when deleting pubsub node from CLI
authorMatthew Jordan <mjordan@digium.com>
Mon, 11 Feb 2013 15:03:40 +0000 (15:03 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 11 Feb 2013 15:03:40 +0000 (15:03 +0000)
An error existed in res_xmpp where it would attempt to delete attributes from
a node that itself was also deleted. Per the iksemel documentation, attributes
added using iks_insert are copied to the parent node's stack, and will be
reclaimed when that node is itself destroyed.

(closes issue ASTERISK-20982)
Reported by: marcelloceschia
patches:
  delete-node-fix.diff uploaded by marcelloceschia (License 6036)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381159 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_xmpp.c

index 24612ba122cc01c5337168c5a7c5b6e977d9eaa3..a651dd51faa6737c64457a69ff26ef80ad0c637f 100644 (file)
@@ -1083,8 +1083,6 @@ static void xmpp_pubsub_delete_node(struct ast_xmpp_client *client, const char *
        iks_insert_attrib(delete, "node", node_name);
        ast_xmpp_client_send(client, request);
 
-       iks_delete(delete);
-       iks_delete(pubsub);
        iks_delete(request);
 }