pgsql: Initialize new jsonb iterator to zero

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Initialize new jsonb iterator to zero
Date: 2018-05-29 04:30:48
Message-ID: E1fNWHY-0004Zb-MQ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Initialize new jsonb iterator to zero

Use palloc0() instead of palloc() to create a new JsonbIterator.
Otherwise, the isScalar field is sometimes not initialized. There is
probably no impact in practice, but it's cleaner this way and it avoids
future problems.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3c9cf069454d80b0b4a54a0a90941a88a97b1122

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2018-05-30 16:46:14 pgsql: Move _bt_upgrademetapage() into critical section.
Previous Message Andrew Dunstan 2018-05-28 20:49:04 pgsql: Return a value from Install.pm's lcopy function