mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
fix a potential segfault
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -811,7 +811,11 @@ static int aji_client_info_handler(void *data, ikspak *pak)
|
||||
buddy = ASTOBJ_CONTAINER_FIND(&client->buddies, pak->from->partial);
|
||||
|
||||
resource = aji_find_resource(buddy, pak->from->resource);
|
||||
|
||||
if (!resource) {
|
||||
ast_log(LOG_NOTICE,"JABBER: Received client info from %s when not requested.\n", pak->from->full);
|
||||
ASTOBJ_UNREF(client, aji_client_destroy);
|
||||
return IKS_FILTER_EAT;
|
||||
}
|
||||
if (pak->subtype == IKS_TYPE_RESULT) {
|
||||
if (iks_find_with_attrib(pak->query, "feature", "var", "http://www.google.com/xmpp/protocol/voice/v1")) {
|
||||
resource->cap->jingle = 1;
|
||||
@@ -837,8 +841,8 @@ static int aji_client_info_handler(void *data, ikspak *pak)
|
||||
iks_insert_attrib(google, "var", "http://www.google.com/xmpp/protocol/voice/v1");
|
||||
iks_insert_node(iq, query);
|
||||
iks_insert_node(query, ident);
|
||||
iks_insert_node(query, disco);
|
||||
iks_insert_node(query, google);
|
||||
iks_insert_node(query, disco);
|
||||
iks_send(client->p, iq);
|
||||
} else
|
||||
ast_log(LOG_ERROR, "Out of Memory.\n");
|
||||
|
Reference in New Issue
Block a user