mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Fix silly nil-pointer-dereference bug introduced in commit d5f6f13f8
.
Don't fetch record->xl_info before we've verified that record isn't NULL. Per Coverity. Michael Paquier
This commit is contained in:
@ -7812,7 +7812,6 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
|
||||
}
|
||||
|
||||
record = ReadRecord(xlogreader, RecPtr, LOG, true);
|
||||
info = record->xl_info & ~XLR_INFO_MASK;
|
||||
|
||||
if (record == NULL)
|
||||
{
|
||||
@ -7855,6 +7854,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
info = record->xl_info & ~XLR_INFO_MASK;
|
||||
if (info != XLOG_CHECKPOINT_SHUTDOWN &&
|
||||
info != XLOG_CHECKPOINT_ONLINE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user