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:
parent
32416b0f9a
commit
5485c99e7f
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user