Fix some memory leaks associated with parsing json and manifests

Andrew Dunstan <andrew@dunslane.net>

Commit: 661ab4e185784db79c194b5758555b1db3f30483
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2024-04-12T14:32:30Z
Releases: 17.0
Fix some memory leaks associated with parsing json and manifests

Coverity complained about not freeing some memory associated with
incrementally parsing backup manifests. To fix that, provide and use a new
shutdown function for the JsonManifestParseIncrementalState object, in
line with a suggestion from Tom Lane.

While analysing the problem, I noticed a buglet in freeing memory for
incremental json lexers. To fix that remove a bogus condition on
freeing the memory allocated for them.

Files