]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix some esc_obj handling in DBI and wrong free in postgresql.c
authorMarco van Wieringen <mvw@planets.elm.net>
Sun, 6 Mar 2011 18:17:23 +0000 (19:17 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:43:39 +0000 (14:43 +0200)
bacula/src/cats/dbi.c
bacula/src/cats/postgresql.c

index 806e67b0b9ed07d001081b5477442c879e090f00..dc88bfed4ad72e21685f50330f0f9b8a90808c44 100644 (file)
@@ -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);
       }
index e0ec34838e82d63b2c4e309f46f16a9d89917d01..0e17372783d387db1c626906c112f223e6f120ef 100644 (file)
@@ -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;