Release PQconninfoOptions array in GetDbnameFromConnectionOptions().
Tom Lane <tgl@sss.pgh.pa.us>
Release PQconninfoOptions array in GetDbnameFromConnectionOptions(). It wasn't getting freed in one code path, which Coverity identified as a resource leak. It's probably of little consequence, but re-ordering the code into the correct sequence is no more work than dismissing the complaint. Minor oversight in commit a145f424d. While here, improve the unreasonably clunky coding of FindDbnameInConnParams: use of an output parameter is unnecessary and prone to uninitialized-variable problems.
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_basebackup/streamutil.c | modified | +14 −15 |