mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-13 14:54:41 +00:00
LOG: cleanup logging resources at exit
Signed-off-by: Angus Salkeld <asalkeld@redhat.com> Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
21f1008be8
commit
0fc51c40fd
@ -243,6 +243,20 @@ static const char *_logsys_tags_stringify(uint32_t tags)
|
||||
}
|
||||
}
|
||||
|
||||
void logsys_system_fini (void)
|
||||
{
|
||||
int i;
|
||||
int f;
|
||||
for (i = 0; i < LOGSYS_MAX_SUBSYS_COUNT; i++) {
|
||||
free(logsys_loggers[i].logfile);
|
||||
for (f = 0; i < logsys_loggers[i].file_idx; f++) {
|
||||
free(logsys_loggers[i].files[f]);
|
||||
}
|
||||
}
|
||||
|
||||
qb_log_fini ();
|
||||
}
|
||||
|
||||
/*
|
||||
* Internal API - exported
|
||||
*/
|
||||
|
@ -147,7 +147,7 @@ void _corosync_exit_error (
|
||||
log_printf (LOGSYS_LEVEL_ERROR, "Corosync Cluster Engine exiting "
|
||||
"with status %d at %s:%u.\n", err, file, line);
|
||||
}
|
||||
qb_log_fini();
|
||||
logsys_system_fini ();
|
||||
exit (err);
|
||||
}
|
||||
|
||||
|
@ -157,6 +157,8 @@ extern int _logsys_system_setup(
|
||||
int syslog_facility,
|
||||
int syslog_priority);
|
||||
|
||||
extern void logsys_system_fini (void);
|
||||
|
||||
extern int _logsys_config_subsys_get (
|
||||
const char *subsys);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user