Missing a destroyPQExpBuffer() in the early exit branch. The early
exits aren't really necessary. Most similar functions just proceed
running the rest of the code zero times and clean up at the end.
ntups = PQntuples(res);
- if (ntups == 0)
- {
- /*
- * There are no publications defined. Clean up and return.
- */
- PQclear(res);
- return;
- }
-
i_tableoid = PQfnumber(res, "tableoid");
i_oid = PQfnumber(res, "oid");
i_pubname = PQfnumber(res, "pubname");
ntups = PQntuples(res);
- if (ntups == 0)
- {
- /*
- * There are no subscriptions defined. Clean up and return.
- */
- PQclear(res);
- return;
- }
-
i_tableoid = PQfnumber(res, "tableoid");
i_oid = PQfnumber(res, "oid");
i_subname = PQfnumber(res, "subname");