bareos: master 02722642

Author Committer Branch Timestamp Parent
Sebastian Sura Bareos Bot master 2024-03-01 11:36 master 3f332687 Pending
Changeset postgresql: fix memory leaks

PQfinish _always_ has to be called on db_handle_, if its not null:

https://www.postgresql.org/docs/current/libpq-connect.html

"Note that when PQconnectStart or PQconnectStartParams returns a
non-null pointer, you must call PQfinish when you are finished with
it, in order to dispose of the structure and any associated memory
blocks. This must be done even if the connection attempt fails or is
abandoned."

PQexec() always allocates a new result object, that always has to be
freed with PQclear()!
mod - core/src/cats/postgresql.cc Diff File