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:
parent
7293986e44
commit
6ef8831aab
|
@ -1767,6 +1767,7 @@ int ast_aji_create_chat(struct aji_client *client, char *room, char *server, cha
|
|||
int res = 0;
|
||||
iks *iq = NULL;
|
||||
iq = iks_new("iq");
|
||||
|
||||
if (iq && client) {
|
||||
iks_insert_attrib(iq, "type", "get");
|
||||
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);
|
||||
} else
|
||||
ast_log(LOG_ERROR, "Out of memory.\n");
|
||||
|
||||
iks_delete(iq);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue