Skip to content

Commit 35d55a2

Browse files
bjoernricksgreenbonebot
authored andcommitted
Change: Only free log domain if it is not NULL
Avoid calling free on not available memory and causing a segmentation fault.
1 parent 7e201a7 commit 35d55a2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

base/logging_domain.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ gvm_logging_domain_new (gchar *log_domain)
7171
void
7272
gvm_logging_domain_free (gvm_logging_domain_t *log_domain)
7373
{
74+
if (log_domain == NULL)
75+
return;
76+
7477
g_free (log_domain->log_domain);
7578
g_free (log_domain->prepend_string);
7679
g_free (log_domain->prepend_time_format);

0 commit comments

Comments
 (0)