aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-11 19:51:40 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-11 19:51:40 +0000
commit4564a686b4c54390a52d2ecfd6228710104f0afa (patch)
tree0bbdb049e2eaa6002036023e40426e88f37dc358 /main
parente22376d01e99702ae428b9767abb190c9eee6d85 (diff)
Fix potential memory leak with the dialed interfaces list if another memory allocation fails.
(closes issue #11507) Reported by: eliel Patches: global_datastores.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92363 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/global_datastores.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/global_datastores.c b/main/global_datastores.c
index 340e71de1..8afe55a66 100644
--- a/main/global_datastores.c
+++ b/main/global_datastores.c
@@ -61,6 +61,7 @@ static void *dialed_interface_duplicate(void *data)
struct ast_dialed_interface *di2 = ast_calloc(1, sizeof(*di2) + strlen(di->interface));
if(!di2) {
AST_LIST_UNLOCK(old_list);
+ dialed_interface_destroy(new_list);
return NULL;
}
strcpy(di2->interface, di->interface);