diff --git a/src/command/archive/push/push.c b/src/command/archive/push/push.c index 3229bb233..c708a3c7c 100644 --- a/src/command/archive/push/push.c +++ b/src/command/archive/push/push.c @@ -41,15 +41,19 @@ Ready file extension constants Format the warning when a file is dropped ***********************************************************************************************************************************/ static String * -archivePushDropWarning(const String *walFile, uint64_t queueMax) +archivePushDropWarning(const String *const walFile, const uint64_t queueMax) { FUNCTION_TEST_BEGIN(); FUNCTION_TEST_PARAM(STRING, walFile); FUNCTION_TEST_PARAM(UINT64, queueMax); FUNCTION_TEST_END(); - FUNCTION_TEST_RETURN( - STRING, strNewFmt("dropped WAL file '%s' because archive queue exceeded %s", strZ(walFile), strZ(strSizeFormat(queueMax)))); + String *const size = strSizeFormat(queueMax); + String *const result = strNewFmt("dropped WAL file '%s' because archive queue exceeded %s", strZ(walFile), strZ(size)); + + strFree(size); + + FUNCTION_TEST_RETURN(STRING, result); } /***********************************************************************************************************************************