mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
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:
@@ -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));
|
res = (struct aji_version *)malloc(sizeof(struct aji_version));
|
||||||
if(!res) {
|
if(!res) {
|
||||||
ast_log(LOG_ERROR, "Out of memory!\n");
|
ast_log(LOG_ERROR, "Out of memory!\n");
|
||||||
|
ast_free(list);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ast_copy_string(list->node, node, sizeof(list->node));
|
ast_copy_string(list->node, node, sizeof(list->node));
|
||||||
|
|||||||
Reference in New Issue
Block a user