syslog_init_post_vm(): If the syslog is disabled, clear sSyslogBuffer. It is
already initialized in syslog_init(), if the debug syslog feature is enabled. Since the area would never be created, the pointer becomes invalid, however, and could cause a double fault on entering KDL. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36528 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8ffd908216
commit
7b8344c61e
@ -1321,8 +1321,12 @@ syslog_init_post_vm(struct kernel_args* args)
|
||||
status_t status;
|
||||
int32 length = 0;
|
||||
|
||||
if (!sSyslogOutputEnabled)
|
||||
if (!sSyslogOutputEnabled) {
|
||||
sSyslogBuffer = NULL;
|
||||
// Might already have been set in syslog_init(), if the debug syslog
|
||||
// was enabled. Just drop it -- we'll never create the area.
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
sSyslogMessage = (syslog_message*)malloc(SYSLOG_MESSAGE_BUFFER_SIZE);
|
||||
if (sSyslogMessage == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user