Make sure we free some allocated memory before returning.

Issue 11131, patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2007-10-31 21:23:11 +00:00
parent 40cd95fc27
commit f43de2908a

View File

@@ -277,6 +277,7 @@ static struct aji_version *aji_find_version(char *node, char *version, ikspak *p
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));