mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
app_jack: fix datastore memory leak in error handling path.
........ Merged revisions 360360 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 360361 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -904,8 +904,14 @@ static int enable_jack_hook(struct ast_channel *chan, char *data)
|
||||
return_error:
|
||||
ast_channel_unlock(chan);
|
||||
|
||||
if (jack_data)
|
||||
if (jack_data) {
|
||||
destroy_jack_data(jack_data);
|
||||
}
|
||||
|
||||
if (datastore) {
|
||||
datastore->data = NULL;
|
||||
ast_datastore_free(datastore);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user