File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2974,7 +2974,10 @@ lookup_function_oid(const char *desc, Oid *foid)
29742974 appendPQExpBuffer (query , "::pg_catalog.%s::pg_catalog.oid" ,
29752975 strchr (desc , '(' ) ? "regprocedure" : "regproc" );
29762976 if (!lookup_function_echo_hidden (query -> data ))
2977+ {
2978+ destroyPQExpBuffer (query );
29772979 return false;
2980+ }
29782981 res = PQexec (pset .db , query -> data );
29792982 if (PQresultStatus (res ) == PGRES_TUPLES_OK && PQntuples (res ) == 1 )
29802983 * foid = atooid (PQgetvalue (res , 0 , 0 ));
@@ -3005,7 +3008,10 @@ get_create_function_cmd(Oid oid, PQExpBuffer buf)
30053008 printfPQExpBuffer (query , "SELECT pg_catalog.pg_get_functiondef(%u)" , oid );
30063009
30073010 if (!lookup_function_echo_hidden (query -> data ))
3011+ {
3012+ destroyPQExpBuffer (query );
30083013 return false;
3014+ }
30093015 res = PQexec (pset .db , query -> data );
30103016 if (PQresultStatus (res ) == PGRES_TUPLES_OK && PQntuples (res ) == 1 )
30113017 {
You can’t perform that action at this time.
0 commit comments