Unset sSyslogBuffer in all error cases in which we disable syslog output.

Spotted by Axel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-04-29 15:32:54 +00:00
parent d3166e469c
commit 73f4184b7b

View File

@ -1306,6 +1306,8 @@ syslog_init_post_threads(void)
delete_area(area_for(sSyslogBuffer));
else
delete_ring_buffer(sSyslogBuffer);
sSyslogBuffer = NULL;
}
free(sSyslogMessage);
@ -1364,7 +1366,6 @@ syslog_init_post_vm(struct kernel_args* args)
area_id area = create_area("syslog debug", &base, B_EXACT_ADDRESS, size,
B_ALREADY_WIRED, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA);
if (area < 0) {
sSyslogBuffer = NULL;
status = B_NO_MEMORY;
goto err2;
}
@ -1402,6 +1403,7 @@ err2:
free(sSyslogMessage);
err1:
sSyslogOutputEnabled = false;
sSyslogBuffer = NULL;
return status;
}