Skip to content

Commit

Permalink
Fix: Always init logger mutex before use
Browse files Browse the repository at this point in the history
(cherry picked from commit c71a1d5)
  • Loading branch information
ArnoStiefvater authored and mergify-bot committed Dec 1, 2021
1 parent d8da3bd commit 98c55cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ gvm_log_lock_init (void)
void
gvm_log_lock (void)
{
/* Initialize logger lock if not done already. */
gvm_log_lock_init ();

g_mutex_lock (logger_mutex);
}

Expand Down Expand Up @@ -418,9 +421,6 @@ gvm_log_func (const char *log_domain, GLogLevelFlags log_level,
gchar *syslog_facility = "local0";
gchar *syslog_ident = NULL;

/* Initialize logger lock if not done. */
gvm_log_lock_init ();

/* Let's load the default configuration file directives from the
* linked list. Scanning the link list twice is inefficient but
* leaves the source cleaner.
Expand Down

0 comments on commit 98c55cd

Please sign in to comment.