File tree 1 file changed +6
-0
lines changed
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)
2974
2974
appendPQExpBuffer (query , "::pg_catalog.%s::pg_catalog.oid" ,
2975
2975
strchr (desc , '(' ) ? "regprocedure" : "regproc" );
2976
2976
if (!lookup_function_echo_hidden (query -> data ))
2977
+ {
2978
+ destroyPQExpBuffer (query );
2977
2979
return false;
2980
+ }
2978
2981
res = PQexec (pset .db , query -> data );
2979
2982
if (PQresultStatus (res ) == PGRES_TUPLES_OK && PQntuples (res ) == 1 )
2980
2983
* foid = atooid (PQgetvalue (res , 0 , 0 ));
@@ -3005,7 +3008,10 @@ get_create_function_cmd(Oid oid, PQExpBuffer buf)
3005
3008
printfPQExpBuffer (query , "SELECT pg_catalog.pg_get_functiondef(%u)" , oid );
3006
3009
3007
3010
if (!lookup_function_echo_hidden (query -> data ))
3011
+ {
3012
+ destroyPQExpBuffer (query );
3008
3013
return false;
3014
+ }
3009
3015
res = PQexec (pset .db , query -> data );
3010
3016
if (PQresultStatus (res ) == PGRES_TUPLES_OK && PQntuples (res ) == 1 )
3011
3017
{
You can’t perform that action at this time.
0 commit comments