Skip to content

Commit cdfecf6

Browse files
committed
Minor cleanups
1 parent 7f12995 commit cdfecf6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

contrib/intarray/_int_gist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ g_int_consistent(PG_FUNCTION_ARGS)
4747

4848
/* sort query for fast search, key is already sorted */
4949
CHECKARRVALID(query);
50-
if (ARRISVOID(query))
50+
if (ARRISVOID(query)) {
51+
pfree( query );
5152
PG_RETURN_BOOL(false);
53+
}
5254
PREPAREARR(query);
5355

5456
switch (strategy)

contrib/intarray/_intbig_gist.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,14 @@ g_intbig_consistent(PG_FUNCTION_ARGS)
510510
GETSIGN(DatumGetPointer(entry->key)),
511511
false);
512512
PG_FREE_IF_COPY( query, 1 );
513-
return retval;
513+
PG_RETURN_BOOL(retval);
514514
}
515515

516516
CHECKARRVALID(query);
517-
if (ARRISVOID(query))
518-
return FALSE;
517+
if (ARRISVOID(query)) {
518+
PG_FREE_IF_COPY( query, 1 );
519+
PG_RETURN_BOOL(FALSE);
520+
}
519521

520522
switch (strategy)
521523
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy