Fix stupid mistake in rank_cd_def cleanup
authorTeodor Sigaev <teodor@sigaev.ru>
Mon, 10 Apr 2006 09:56:52 +0000 (09:56 +0000)
committerTeodor Sigaev <teodor@sigaev.ru>
Mon, 10 Apr 2006 09:56:52 +0000 (09:56 +0000)
contrib/tsearch2/rank.c

index 29732c1c91c795226b37c5e0a8828f8a1c93e361..7ffa62051f563dedb7f82f18d3aeefabb4ebfd5b 100644 (file)
@@ -748,8 +748,8 @@ rank_cd_def(PG_FUNCTION_ARGS)
 
    res = calc_rank_cd( weights, txt, query, (PG_NARGS() == 3) ? PG_GETARG_DATUM(2) : DEF_NORM_METHOD);
    
-   PG_FREE_IF_COPY(txt, 1);
-   PG_FREE_IF_COPY(query, 2);
+   PG_FREE_IF_COPY(txt, 0);
+   PG_FREE_IF_COPY(query, 1);
 
    PG_RETURN_FLOAT4(res);
 }