Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e889422

Browse files
pg_amcheck: PQclear query results
While the potential memory leak is small, ensure to PQclear the query results before disconnecting. Author: Jiao Shuntian <312199339@qq.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/tencent_F34922C91C41E76C734773E767C9FBDB9906@qq.com
1 parent 5ee75e3 commit e889422

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/pg_amcheck/pg_amcheck.c

+1
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ main(int argc, char *argv[])
587587
/* Querying the catalog succeeded, but amcheck is missing. */
588588
pg_log_warning("skipping database \"%s\": amcheck is not installed",
589589
PQdb(conn));
590+
PQclear(result);
590591
disconnectDatabase(conn);
591592
conn = NULL;
592593
continue;

0 commit comments

Comments
 (0)