aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/dict_int/dict_int.c2
-rw-r--r--contrib/dict_xsyn/dict_xsyn.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/contrib/dict_int/dict_int.c b/contrib/dict_int/dict_int.c
index c4ad6ef343e..ed82d83004c 100644
--- a/contrib/dict_int/dict_int.c
+++ b/contrib/dict_int/dict_int.c
@@ -73,7 +73,7 @@ dintdict_lexize(PG_FUNCTION_ARGS)
DictInt *d = (DictInt *) PG_GETARG_POINTER(0);
char *in = (char *) PG_GETARG_POINTER(1);
char *txt = pnstrdup(in, PG_GETARG_INT32(2));
- TSLexeme *res = palloc(sizeof(TSLexeme) * 2);
+ TSLexeme *res = palloc0(sizeof(TSLexeme) * 2);
res[1].lexeme = NULL;
if (PG_GETARG_INT32(2) > d->maxlen)
diff --git a/contrib/dict_xsyn/dict_xsyn.c b/contrib/dict_xsyn/dict_xsyn.c
index ded20facd47..18301effc7c 100644
--- a/contrib/dict_xsyn/dict_xsyn.c
+++ b/contrib/dict_xsyn/dict_xsyn.c
@@ -245,6 +245,8 @@ dxsyn_lexize(PG_FUNCTION_ARGS)
if (pos != value || d->keeporig)
{
res[nsyns].lexeme = pnstrdup(syn, end - syn);
+ res[nsyns].nvariant = 0;
+ res[nsyns].flags = 0;
nsyns++;
}