From 698d1e27d6519dbfb20bd8dd85196612bedc7597 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sun, 6 Mar 2011 19:17:23 +0100 Subject: [PATCH] Fix some esc_obj handling in DBI and wrong free in postgresql.c --- bacula/src/cats/dbi.c | 2 ++ bacula/src/cats/postgresql.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bacula/src/cats/dbi.c b/bacula/src/cats/dbi.c index 806e67b0b9..dc88bfed4a 100644 --- a/bacula/src/cats/dbi.c +++ b/bacula/src/cats/dbi.c @@ -168,6 +168,7 @@ B_DB_DBI::B_DB_DBI(JCR *jcr, path = get_pool_memory(PM_FNAME); esc_name = get_pool_memory(PM_FNAME); esc_path = get_pool_memory(PM_FNAME); + esc_obj = get_pool_memory(PM_FNAME); m_allow_transactions = mult_db_connections; /* @@ -352,6 +353,7 @@ void B_DB_DBI::db_close_database(JCR *jcr) free_pool_memory(path); free_pool_memory(esc_name); free_pool_memory(esc_path); + free_pool_memory(esc_obj); if (m_db_driver) { free(m_db_driver); } diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index e0ec34838e..0e17372783 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -308,9 +308,6 @@ void B_DB_POSTGRESQL::db_close_database(JCR *jcr) if (m_db_socket) { free(m_db_socket); } - if (esc_obj) { - PQfreemem(esc_obj); - } delete this; if (db_list->size() == 0) { delete db_list; -- 2.39.5