diff --git a/contrib/dict_int/dict_int.c b/contrib/dict_int/dict_int.c index 8e1918613f7..e478e680934 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 dc16d9583e2..656271fa47c 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++; }