Skip to content
Snippets Groups Projects
Commit cdfecf6e authored by Teodor Sigaev's avatar Teodor Sigaev
Browse files

Minor cleanups

parent 7f129956
No related branches found
No related tags found
No related merge requests found
...@@ -47,8 +47,10 @@ g_int_consistent(PG_FUNCTION_ARGS) ...@@ -47,8 +47,10 @@ g_int_consistent(PG_FUNCTION_ARGS)
/* sort query for fast search, key is already sorted */ /* sort query for fast search, key is already sorted */
CHECKARRVALID(query); CHECKARRVALID(query);
if (ARRISVOID(query)) if (ARRISVOID(query)) {
pfree( query );
PG_RETURN_BOOL(false); PG_RETURN_BOOL(false);
}
PREPAREARR(query); PREPAREARR(query);
switch (strategy) switch (strategy)
......
...@@ -510,12 +510,14 @@ g_intbig_consistent(PG_FUNCTION_ARGS) ...@@ -510,12 +510,14 @@ g_intbig_consistent(PG_FUNCTION_ARGS)
GETSIGN(DatumGetPointer(entry->key)), GETSIGN(DatumGetPointer(entry->key)),
false); false);
PG_FREE_IF_COPY( query, 1 ); PG_FREE_IF_COPY( query, 1 );
return retval; PG_RETURN_BOOL(retval);
} }
CHECKARRVALID(query); CHECKARRVALID(query);
if (ARRISVOID(query)) if (ARRISVOID(query)) {
return FALSE; PG_FREE_IF_COPY( query, 1 );
PG_RETURN_BOOL(FALSE);
}
switch (strategy) switch (strategy)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment