Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf67aee

Browse files
committed
pg_waldump: Fix small memory leak when rmgr->rm_identify returns NULL.
This got broken in604f795, shortly after rm_identify'sintroduction.Author: Andres FreundDiscussion:https://postgr.es/m/20191029233341.4gnyau7e5v2lh5sc@alap3.anarazel.deBackpatch: 9.5, where rm_identify was introduced
1 parent9f7a664 commitaf67aee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/bin/pg_waldump/pg_waldump.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,17 +542,18 @@ XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
542542

543543
XLogDumpRecordLen(record,&rec_len,&fpi_len);
544544

545-
id=desc->rm_identify(info);
546-
if (id==NULL)
547-
id=psprintf("UNKNOWN (%x)",info& ~XLR_INFO_MASK);
548-
549545
printf("rmgr: %-11s len (rec/tot): %6u/%6u, tx: %10u, lsn: %X/%08X, prev %X/%08X, ",
550546
desc->rm_name,
551547
rec_len,XLogRecGetTotalLen(record),
552548
XLogRecGetXid(record),
553549
(uint32) (record->ReadRecPtr >>32), (uint32)record->ReadRecPtr,
554550
(uint32) (xl_prev >>32), (uint32)xl_prev);
555-
printf("desc: %s ",id);
551+
552+
id=desc->rm_identify(info);
553+
if (id==NULL)
554+
printf("desc: UNKNOWN (%x) ",info& ~XLR_INFO_MASK);
555+
else
556+
printf("desc: %s ",id);
556557

557558
/* the desc routine will printf the description directly to stdout */
558559
desc->rm_desc(NULL,record);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp