ltree: Zero padding bytes when allocating memory for externally visible data.

Andres Freund <andres@anarazel.de>

Commit: 7a1d4a2448c34ed4669d67ae4f24c594545f10b5
Author: Andres Freund <andres@anarazel.de>
Date: 2016-03-08T22:59:29Z
Releases: 9.6.0
ltree: Zero padding bytes when allocating memory for externally visible data.

ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment,
requiring some padding bytes. So far we left these uninitialized. Zero
those by using palloc0.

Author: Andres Freund
Reported-By: Andres Freund / valgrind / buildarm animal skink
Backpatch: 9.1-

Files

PathChange+/−
contrib/ltree/_ltree_gist.c modified +7 −7
contrib/ltree/ltree_gist.c modified +5 −5
contrib/ltree/_ltree_op.c modified +4 −4
contrib/ltree/ltree_op.c modified +3 −3
contrib/ltree/ltxtquery_io.c modified +1 −1