[asterisk-commits] qwell: branch 1.4 r87908 - /branches/1.4/res/res_jabber.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 31 16:23:11 CDT 2007


Author: qwell
Date: Wed Oct 31 16:23:11 2007
New Revision: 87908

URL: http://svn.digium.com/view/asterisk?view=rev&rev=87908
Log:
Make sure we free some allocated memory before returning.

Issue 11131, patch by eliel.

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=87908&r1=87907&r2=87908
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Wed Oct 31 16:23:11 2007
@@ -277,6 +277,7 @@
 		res = (struct aji_version *)malloc(sizeof(struct aji_version));
 		if(!res) {
 			ast_log(LOG_ERROR, "Out of memory!\n");
+			ast_free(list);
 			return NULL;
 		}
 		ast_copy_string(list->node, node, sizeof(list->node));




More information about the asterisk-commits mailing list