mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
same as in other places, check that generator->release is not NULL
before calling it. This allows generators to set it to NULL when they have nothing to do there. Later, the three copies of the code that releases a generator should be moved to a function. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1572,6 +1572,7 @@ int ast_hangup(struct ast_channel *chan)
|
||||
}
|
||||
|
||||
if (chan->generatordata) /* Clear any tone stuff remaining */
|
||||
if (chan->generator && chan->generator->release)
|
||||
chan->generator->release(chan, chan->generatordata);
|
||||
chan->generatordata = NULL;
|
||||
chan->generator = NULL;
|
||||
|
Reference in New Issue
Block a user