mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Merged revisions 105326 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r105326 | phsultan | 2008-02-29 15:47:10 +0100 (Fri, 29 Feb 2008) | 1 line Fix a potential memory leak ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1767,6 +1767,7 @@ int ast_aji_create_chat(struct aji_client *client, char *room, char *server, cha
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
iks *iq = NULL;
|
iks *iq = NULL;
|
||||||
iq = iks_new("iq");
|
iq = iks_new("iq");
|
||||||
|
|
||||||
if (iq && client) {
|
if (iq && client) {
|
||||||
iks_insert_attrib(iq, "type", "get");
|
iks_insert_attrib(iq, "type", "get");
|
||||||
iks_insert_attrib(iq, "to", server);
|
iks_insert_attrib(iq, "to", server);
|
||||||
@@ -1775,6 +1776,9 @@ int ast_aji_create_chat(struct aji_client *client, char *room, char *server, cha
|
|||||||
ast_aji_send(client, iq);
|
ast_aji_send(client, iq);
|
||||||
} else
|
} else
|
||||||
ast_log(LOG_ERROR, "Out of memory.\n");
|
ast_log(LOG_ERROR, "Out of memory.\n");
|
||||||
|
|
||||||
|
iks_delete(iq);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user