1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Remove unneeded null pointer checks before PQfreemem()

PQfreemem() just calls free(), and the latter already checks for null
pointers.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/cf26e970-8e92-59f1-247a-aa265235075b%40enterprisedb.com
This commit is contained in:
Peter Eisentraut
2022-08-26 19:16:28 +02:00
parent 45987aae26
commit e890ce7a4f
3 changed files with 8 additions and 16 deletions

View File

@@ -231,12 +231,9 @@ vacuumlo(const char *database, const struct _param *param)
pg_log_error("%s", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
if (schema != NULL)
PQfreemem(schema);
if (table != NULL)
PQfreemem(table);
if (field != NULL)
PQfreemem(field);
PQfreemem(schema);
PQfreemem(table);
PQfreemem(field);
return -1;
}