1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

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
This commit is contained in:
Daniel Gustafsson 2025-02-24 16:03:19 +01:00
parent 5ee75e32fa
commit e889422d98

View File

@ -587,6 +587,7 @@ main(int argc, char *argv[])
/* Querying the catalog succeeded, but amcheck is missing. */
pg_log_warning("skipping database \"%s\": amcheck is not installed",
PQdb(conn));
PQclear(result);
disconnectDatabase(conn);
conn = NULL;
continue;