]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix Sqlite driver seg fault
authorKern Sibbald <kern@sibbald.com>
Sat, 16 Apr 2011 12:16:49 +0000 (14:16 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:44:34 +0000 (14:44 +0200)
bacula/src/cats/sqlite.c

index 4850f7a6ade7f57bc8a2c583ba0fe5051bbc7c1d..d26632c53c1751a51ff0bce26e9ad505c1f923ed 100644 (file)
@@ -225,9 +225,9 @@ void B_DB_SQLITE::db_close_database(JCR *jcr)
 {
    db_end_transaction(jcr);
    P(mutex);
-   sql_free_result();
    m_ref_count--;
    if (m_ref_count == 0) {
+      sql_free_result();
       db_list->remove(this);
       if (m_connected && m_db_handle) {
          sqlite3_close(m_db_handle);