diff --git a/contrib/tsearch2/ts_cfg.c b/contrib/tsearch2/ts_cfg.c index 0526ce9879..345e43f398 100644 --- a/contrib/tsearch2/ts_cfg.c +++ b/contrib/tsearch2/ts_cfg.c @@ -224,8 +224,8 @@ findcfg(Oid id) CList.reallen = reallen; CList.list = tmp; } + init_cfg(id, &(CList.list[CList.len]) ); CList.last_cfg = &(CList.list[CList.len]); - init_cfg(id, CList.last_cfg); CList.len++; qsort(CList.list, CList.len, sizeof(TSCfgInfo), comparecfg); return findcfg(id); /* qsort changed order!! */ ; diff --git a/contrib/tsearch2/wparser.c b/contrib/tsearch2/wparser.c index efe449451f..31148db62b 100644 --- a/contrib/tsearch2/wparser.c +++ b/contrib/tsearch2/wparser.c @@ -127,8 +127,8 @@ findprs(Oid id) PList.reallen = reallen; PList.list = tmp; } + init_prs(id, &(PList.list[PList.len]) ); PList.last_prs = &(PList.list[PList.len]); - init_prs(id, PList.last_prs); PList.len++; qsort(PList.list, PList.len, sizeof(WParserInfo), compareprs); return findprs(id); /* qsort changed order!! */ ;