Merged revisions 87908 via svnmerge from
authorJason Parker <jparker@digium.com>
Wed, 31 Oct 2007 21:23:42 +0000 (21:23 +0000)
committerJason Parker <jparker@digium.com>
Wed, 31 Oct 2007 21:23:42 +0000 (21:23 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11131)
........
r87908 | qwell | 2007-10-31 16:23:11 -0500 (Wed, 31 Oct 2007) | 4 lines

Make sure we free some allocated memory before returning.

Issue 11131, patch by eliel.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87909 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_jabber.c

index fb118c1..60b6b75 100644 (file)
@@ -250,6 +250,7 @@ static struct aji_version *aji_find_version(char *node, char *version, ikspak *p
                res = ast_malloc(sizeof(*res));
                if(!res) {
                        ast_log(LOG_ERROR, "Out of memory!\n");
+                       ast_free(list);
                        return NULL;
                }
                ast_copy_string(list->node, node, sizeof(list->node));