Fix minor leak in pg_dump
Move allocation to after we check the remote server version, to avoid a possible, very minor, memory leak. This makes us more consistent throughout as most places in pg_dump are done in the same way (due, in part, to previous fixes like this). Spotted by the Coverity scanner.
This commit is contained in:
parent
a7e5f7bf68
commit
152d24f5dd
|
@ -3602,7 +3602,7 @@ getConversions(Archive *fout, int *numConversions)
|
||||||
PGresult *res;
|
PGresult *res;
|
||||||
int ntups;
|
int ntups;
|
||||||
int i;
|
int i;
|
||||||
PQExpBuffer query = createPQExpBuffer();
|
PQExpBuffer query;
|
||||||
ConvInfo *convinfo;
|
ConvInfo *convinfo;
|
||||||
int i_tableoid;
|
int i_tableoid;
|
||||||
int i_oid;
|
int i_oid;
|
||||||
|
@ -3617,6 +3617,8 @@ getConversions(Archive *fout, int *numConversions)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query = createPQExpBuffer();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* find all conversions, including builtin conversions; we filter out
|
* find all conversions, including builtin conversions; we filter out
|
||||||
* system-defined conversions at dump-out time.
|
* system-defined conversions at dump-out time.
|
||||||
|
|
Loading…
Reference in New Issue