]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fixes merging error, datastore was being freed in the wrong function.
authorDavid Vossel <dvossel@digium.com>
Thu, 12 Nov 2009 16:41:49 +0000 (16:41 +0000)
committerDavid Vossel <dvossel@digium.com>
Thu, 12 Nov 2009 16:41:49 +0000 (16:41 +0000)
(closes issue #16219)
Reported by: aragon

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

funcs/func_audiohookinherit.c

index 3a5c1763c57d1895e68a8614a255c2f3b4df460c..1891095695cc859c65c4acd24d8aba5e350aa24e 100644 (file)
@@ -77,7 +77,6 @@ static void audiohook_inheritance_fixup(void *data, struct ast_channel *old_chan
                                audiohook->source, old_chan->name, old_chan, new_chan->name, new_chan);
                }
        }
-       ast_free(datastore);
        return;
 }
 
@@ -94,6 +93,8 @@ static void audiohook_inheritance_destroy(void *data)
        while ((inheritable_audiohook = AST_LIST_REMOVE_HEAD(&audiohook_inheritance_datastore->allowed_list, list))) {
                ast_free(inheritable_audiohook);
        }
+
+       ast_free(audiohook_inheritance_datastore);
 }
 
 /*! \brief create an audiohook_inheritance_datastore and attach it to a channel