]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix potential memory leak in app_dial.c
authorMark Michelson <mmichelson@digium.com>
Fri, 9 Oct 2009 18:17:12 +0000 (18:17 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 9 Oct 2009 18:17:12 +0000 (18:17 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@223213 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c

index 95a2e244034df212d0a746cda52af359c88a0f4f..a30b780bcabcfbb503b19680e3ce8da80ca60ee1 100644 (file)
@@ -1224,6 +1224,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
                        datastore->inheritance = DATASTORE_INHERIT_FOREVER;
 
                        if (!(dialed_interfaces = ast_calloc(1, sizeof(*dialed_interfaces)))) {
+                               ast_channel_datastore_free(datastore);
                                free(tmp);
                                goto out;
                        }