mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Fix minor leak in pg_dump for ACCESS METHOD.
Bug reported by Coverity. Author: Michaël Paquier
This commit is contained in:
parent
59a2111b23
commit
37732a2555
@ -11580,6 +11580,7 @@ dumpAccessMethod(Archive *fout, AccessMethodInfo *aminfo)
|
|||||||
default:
|
default:
|
||||||
write_msg(NULL, "WARNING: invalid type %c of access method %s\n",
|
write_msg(NULL, "WARNING: invalid type %c of access method %s\n",
|
||||||
aminfo->amtype, qamname);
|
aminfo->amtype, qamname);
|
||||||
|
pg_free(qamname);
|
||||||
destroyPQExpBuffer(q);
|
destroyPQExpBuffer(q);
|
||||||
destroyPQExpBuffer(delq);
|
destroyPQExpBuffer(delq);
|
||||||
destroyPQExpBuffer(labelq);
|
destroyPQExpBuffer(labelq);
|
||||||
@ -11609,7 +11610,7 @@ dumpAccessMethod(Archive *fout, AccessMethodInfo *aminfo)
|
|||||||
NULL, "",
|
NULL, "",
|
||||||
aminfo->dobj.catId, 0, aminfo->dobj.dumpId);
|
aminfo->dobj.catId, 0, aminfo->dobj.dumpId);
|
||||||
|
|
||||||
free(qamname);
|
pg_free(qamname);
|
||||||
|
|
||||||
destroyPQExpBuffer(q);
|
destroyPQExpBuffer(q);
|
||||||
destroyPQExpBuffer(delq);
|
destroyPQExpBuffer(delq);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user