mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-24 20:05:04 +00:00
logsys_format_set should use its own internal copy of format_buffer
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1796 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
0419be3366
commit
f7c4cea567
@ -873,10 +873,16 @@ void logsys_format_set (char *format)
|
||||
{
|
||||
pthread_mutex_lock (&logsys_config_mutex);
|
||||
|
||||
if (format)
|
||||
format_buffer = format;
|
||||
else
|
||||
format_buffer = "[%6s] %b";
|
||||
if (format_buffer) {
|
||||
free(format_buffer);
|
||||
format_buffer = NULL;
|
||||
}
|
||||
|
||||
if (format) {
|
||||
format_buffer = strdup(format);
|
||||
} else {
|
||||
format_buffer = strdup("[%6s] %b");
|
||||
}
|
||||
|
||||
pthread_mutex_unlock (&logsys_config_mutex);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user