You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Add strLstNewFmt().
Simplifies adding a formatted string to a list and removes a common cause of leaks.
This commit is contained in:
@ -572,7 +572,7 @@ pgLsnRangeToWalSegmentList(
|
||||
unsigned int minorPerMajor = 0xFFFFFFFF / walSegmentSize;
|
||||
|
||||
// Create list
|
||||
strLstAdd(result, strNewFmt("%08X%08X%08X", timeline, startMajor, startMinor));
|
||||
strLstAddFmt(result, "%08X%08X%08X", timeline, startMajor, startMinor);
|
||||
|
||||
while (!(startMajor == stopMajor && startMinor == stopMinor))
|
||||
{
|
||||
@ -584,7 +584,7 @@ pgLsnRangeToWalSegmentList(
|
||||
startMinor = 0;
|
||||
}
|
||||
|
||||
strLstAdd(result, strNewFmt("%08X%08X%08X", timeline, startMajor, startMinor));
|
||||
strLstAddFmt(result, "%08X%08X%08X", timeline, startMajor, startMinor);
|
||||
}
|
||||
|
||||
strLstMove(result, memContextPrior());
|
||||
|
Reference in New Issue
Block a user