summaryrefslogtreecommitdiff
path: root/contrib/ltree/_ltree_op.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ltree/_ltree_op.c')
-rw-r--r--contrib/ltree/_ltree_op.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/ltree/_ltree_op.c b/contrib/ltree/_ltree_op.c
index f4f0451fd88..d9f894c3f1b 100644
--- a/contrib/ltree/_ltree_op.c
+++ b/contrib/ltree/_ltree_op.c
@@ -220,7 +220,7 @@ _ltree_extract_isparent(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
- item = (ltree *) palloc(VARSIZE(found));
+ item = (ltree *) palloc0(VARSIZE(found));
memcpy(item, found, VARSIZE(found));
PG_FREE_IF_COPY(la, 0);
@@ -243,7 +243,7 @@ _ltree_extract_risparent(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
- item = (ltree *) palloc(VARSIZE(found));
+ item = (ltree *) palloc0(VARSIZE(found));
memcpy(item, found, VARSIZE(found));
PG_FREE_IF_COPY(la, 0);
@@ -266,7 +266,7 @@ _ltq_extract_regex(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
- item = (ltree *) palloc(VARSIZE(found));
+ item = (ltree *) palloc0(VARSIZE(found));
memcpy(item, found, VARSIZE(found));
PG_FREE_IF_COPY(la, 0);
@@ -289,7 +289,7 @@ _ltxtq_extract_exec(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
- item = (ltree *) palloc(VARSIZE(found));
+ item = (ltree *) palloc0(VARSIZE(found));
memcpy(item, found, VARSIZE(found));
PG_FREE_IF_COPY(la, 0);