forked from mirrors/linphone-iphone
fix(Logging): free log handler, avoid memory leak
This commit is contained in:
parent
19137ae9f7
commit
ce2b853bae
1 changed files with 3 additions and 1 deletions
|
|
@ -127,6 +127,7 @@ static void _log_handler_on_message_written_cb(void *info,const char *domain, Bc
|
|||
|
||||
static void _log_handler_destroy_cb(bctbx_log_handler_t *handler) {
|
||||
LinphoneLoggingService *service = (LinphoneLoggingService *)bctbx_log_handler_get_user_data(handler);
|
||||
bctbx_free(service->log_handler);
|
||||
service->log_handler = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +163,8 @@ void linphone_logging_service_unref(LinphoneLoggingService *service) {
|
|||
}
|
||||
|
||||
static void _linphone_logging_service_uninit(LinphoneLoggingService *log_service) {
|
||||
if (log_service->log_handler) bctbx_remove_log_handler(log_service->log_handler);
|
||||
if (log_service->log_handler)
|
||||
bctbx_remove_log_handler(log_service->log_handler);
|
||||
linphone_logging_service_cbs_unref(log_service->cbs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue