]> granicus.if.org Git - postgresql/commit
Fix copy-pasto in freeing memory on error in vacuumlo.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 7 Jun 2019 09:44:01 +0000 (12:44 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 7 Jun 2019 09:44:01 +0000 (12:44 +0300)
commit88ca787b16cc5eee79e2e543b2da74ea5b872a85
tree48b534c4c46332a7b1e4badb3dff5e88045f1920
parentfac1ed2742938080112e5e394fb281f7ca361d59
Fix copy-pasto in freeing memory on error in vacuumlo.

It's harmless to call PQfreemem() with a NULL argument, so the only
consequence was that if allocating 'schema' failed, but allocating 'table'
or 'field' succeeded, we would leak a bit of memory. That's highly
unlikely to happen, so this is just academical, but let's get it right.

Per bug #15838 from Timur Birsh. Backpatch back to 9.5, where the
PQfreemem() calls were introduced.

Discussion: https://www.postgresql.org/message-id/15838-3221652c72c5e69d@postgresql.org
contrib/vacuumlo/vacuumlo.c