mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-06 13:07:21 +00:00
datastores: Audit ast_channel_datastore_remove usage.
Audit of v1.8 usage of ast_channel_datastore_remove() for datastore memory leaks. * Fixed leaks in app_speech_utils and func_frame_trace. * Fixed app_speech_utils not locking the channel when accessing the channel datastore list. Review: https://reviewboard.asterisk.org/r/3859/ Audit of v11 usage of ast_channel_datastore_remove() for datastore memory leaks. * Fixed leak in func_jitterbuffer. (Was not in v12) Review: https://reviewboard.asterisk.org/r/3860/ Audit of v12 usage of ast_channel_datastore_remove() for datastore memory leaks. * Fixed leaks in abstract_jb. * Fixed leak in ast_channel_unsuppress(). Used by ARI mute control and res_mutestream. * Fixed ref leak in ast_channel_suppress(). Used by ARI mute control and res_mutestream. Review: https://reviewboard.asterisk.org/r/3861/ ........ Merged revisions 419684 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 419685 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1052,6 +1052,7 @@ void ast_jb_create_framehook(struct ast_channel *chan, struct ast_jb_conf *jb_co
|
||||
id = datastore->data;
|
||||
ast_framehook_detach(chan, *id);
|
||||
ast_channel_datastore_remove(chan, datastore);
|
||||
ast_datastore_free(datastore);
|
||||
}
|
||||
ast_channel_unlock(chan);
|
||||
return;
|
||||
@@ -1084,6 +1085,7 @@ void ast_jb_create_framehook(struct ast_channel *chan, struct ast_jb_conf *jb_co
|
||||
id = datastore->data;
|
||||
ast_framehook_detach(chan, *id);
|
||||
ast_channel_datastore_remove(chan, datastore);
|
||||
ast_datastore_free(datastore);
|
||||
}
|
||||
|
||||
if (!(datastore = ast_datastore_alloc(&jb_datastore, NULL))) {
|
||||
@@ -1109,6 +1111,4 @@ void ast_jb_create_framehook(struct ast_channel *chan, struct ast_jb_conf *jb_co
|
||||
framedata = NULL;
|
||||
}
|
||||
ast_channel_unlock(chan);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user