1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Remove useless memFree() in regExpNew().

The MEM_CONTEXT_NEW*() block will automatically free memory if there is an error.

This code is pretty old so this may not have been true when it was written.
This commit is contained in:
David Steele 2021-08-23 07:58:59 -04:00
parent 5ffb7cc771
commit 8a9887f27c

View File

@ -89,10 +89,7 @@ regExpNew(const String *expression)
int result = 0;
if ((result = regcomp(&this->regExp, strZ(expression), REG_EXTENDED)) != 0)
{
memFree(this);
regExpError(result);
}
// Set free callback to ensure cipher context is freed
memContextCallbackSet(this->memContext, regExpFreeResource, this);