Fix leak in archivePushDropWarning().
@@ -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);
}
/***********************************************************************************************************************************
