In pg_dump.c:getEventTriggers, check what major version we are on
before calling createPQExpBuffer() to avoid leaking that bit of
memory.
Leak discovered by the Coverity scanner.
Back-patch to 9.3 where support for dumping event triggers was
added.
getEventTriggers(Archive *fout, int *numEventTriggers)
{
int i;
- PQExpBuffer query = createPQExpBuffer();
+ PQExpBuffer query;
PGresult *res;
EventTriggerInfo *evtinfo;
int i_tableoid,
return NULL;
}
+ query = createPQExpBuffer();
+
/* Make sure we are in proper schema */
selectSourceSchema(fout, "pg_catalog");