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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user