Skip to content
Snippets Groups Projects
Commit 4a0a5f21 authored by Robert Haas's avatar Robert Haas
Browse files

vacuumlo: Avoid unlikely memory leak.

Spotted by Coverity.  This isn't likely to matter in practice, but
there's no harm in fixing it.

Michael Paquier
parent 59f71a0d
No related branches found
No related tags found
No related merge requests found
......@@ -240,6 +240,12 @@ vacuumlo(const char *database, const struct _param * param)
fprintf(stderr, "Out of memory\n");
PQclear(res);
PQfinish(conn);
if (schema != NULL)
PQfreemem(schema);
if (schema != NULL)
PQfreemem(table);
if (schema != NULL)
PQfreemem(field);
return -1;
}
......@@ -256,6 +262,9 @@ vacuumlo(const char *database, const struct _param * param)
PQclear(res2);
PQclear(res);
PQfinish(conn);
PQfreemem(schema);
PQfreemem(table);
PQfreemem(field);
return -1;
}
PQclear(res2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment