]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 229670 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Thu, 12 Nov 2009 16:49:52 +0000 (16:49 +0000)
committerDavid Vossel <dvossel@digium.com>
Thu, 12 Nov 2009 16:49:52 +0000 (16:49 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r229670 | dvossel | 2009-11-12 10:44:39 -0600 (Thu, 12 Nov 2009) | 12 lines

  Merged revisions 229669 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r229669 | dvossel | 2009-11-12 10:41:49 -0600 (Thu, 12 Nov 2009) | 6 lines

    fixes merging error, datastore was being freed in the wrong function.

    (closes issue #16219)
    Reported by: aragon
  ........
................

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

funcs/func_audiohookinherit.c

index 64357a3a9af317d8bcd0794fb4bec1d9c0f9c562..07865ef71094b3049b05b1bc0542ed3605c622af 100644 (file)
@@ -72,7 +72,6 @@ static void audiohook_inheritance_fixup(void *data, struct ast_channel *old_chan
                ast_debug(3, "Moved audiohook %s from %s(%p) to %s(%p)\n",
                        audiohook->source, old_chan->name, old_chan, new_chan->name, new_chan);
        }
-       ast_free(datastore);
        return;
 }
 
@@ -89,6 +88,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