[asterisk-commits] phsultan: branch 1.4 r105326 - /branches/1.4/res/res_jabber.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 29 08:47:11 CST 2008


Author: phsultan
Date: Fri Feb 29 08:47:10 2008
New Revision: 105326

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105326
Log:
Fix a potential memory leak

Modified:
    branches/1.4/res/res_jabber.c

Modified: branches/1.4/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_jabber.c?view=diff&rev=105326&r1=105325&r2=105326
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Fri Feb 29 08:47:10 2008
@@ -1455,6 +1455,7 @@
 	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);
@@ -1463,6 +1464,9 @@
 		iks_send(client->p, iq);
 	} else 
 		ast_log(LOG_ERROR, "Out of memory.\n");
+
+	iks_delete(iq);
+
 	return res;
 }
 




More information about the asterisk-commits mailing list