1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Fix leak in jsonReadVarRecurse().

This commit is contained in:
David Steele 2023-01-10 11:45:48 +07:00
parent 675b4ae251
commit 0dd2997714

View File

@ -1181,7 +1181,13 @@ jsonReadVarRecurse(JsonRead *const this)
}
case jsonTypeString:
FUNCTION_TEST_RETURN(VARIANT, varNewStr(jsonReadStr(this)));
{
String *const string = jsonReadStr(this);
Variant *const result = varNewStr(string);
strFree(string);
FUNCTION_TEST_RETURN(VARIANT, result);
}
case jsonTypeArrayBegin:
{