Fix two small bugs in json's populate_record_worker

Andrew Dunstan <andrew@dunslane.net>

Commit: 997066f4456c0fc582e62a50e296c77360212049
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2015-05-04T16:43:16Z
Releases: 9.4.2
Fix two small bugs in json's populate_record_worker

The first bug is not releasing a tupdesc when doing an early return out
of the function. The second bug is a logic error in choosing when to do
an early return if given an empty jsonb object.

Bug reports from Pavel Stehule and Tom Lane respectively.

Backpatch to 9.4 where these were introduced.

Files

PathChange+/−
src/backend/utils/adt/jsonfuncs.c modified +5 −1