diff --git a/contrib/dict_int/dict_int.c b/contrib/dict_int/dict_int.c index 9f614471605..68964548a68 100644 --- a/contrib/dict_int/dict_int.c +++ b/contrib/dict_int/dict_int.c @@ -72,7 +72,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 3c05a1ea908..d47315bd793 100644 --- a/contrib/dict_xsyn/dict_xsyn.c +++ b/contrib/dict_xsyn/dict_xsyn.c @@ -244,6 +244,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++; }