release transport system
authorvb
Tue, 23 Sep 2014 23:17:45 +0200
changeset 31132481aa7ed0
parent 30 49f7cbcb91df
child 34 f957a76df853
release transport system
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Wed Sep 10 13:49:35 2014 +0200
     1.2 +++ b/src/pEpEngine.c	Tue Sep 23 23:17:45 2014 +0200
     1.3 @@ -33,6 +33,7 @@
     1.4  
     1.5      assert(LOCAL_DB);
     1.6      if (LOCAL_DB == NULL) {
     1.7 +        release_transport_system(_session);
     1.8          release_cryptotech(_session);
     1.9          free(_session);
    1.10          return PEP_INIT_CANNOT_OPEN_DB;
    1.11 @@ -50,6 +51,7 @@
    1.12  
    1.13  	if (int_result != SQLITE_OK) {
    1.14  		sqlite3_close_v2(_session->db);
    1.15 +        release_transport_system(_session);
    1.16          release_cryptotech(_session);
    1.17          free(_session);
    1.18  		return PEP_INIT_CANNOT_OPEN_DB;
    1.19 @@ -60,6 +62,7 @@
    1.20      assert(SYSTEM_DB);
    1.21      if (SYSTEM_DB == NULL) {
    1.22  		sqlite3_close_v2(_session->db);
    1.23 +        release_transport_system(_session);
    1.24          release_cryptotech(_session);
    1.25          free(_session);
    1.26  		return PEP_INIT_CANNOT_OPEN_SYSTEM_DB;
    1.27 @@ -76,6 +79,7 @@
    1.28  	if (int_result != SQLITE_OK) {
    1.29  		sqlite3_close_v2(_session->system_db);
    1.30  		sqlite3_close_v2(_session->db);
    1.31 +        release_transport_system(_session);
    1.32          release_cryptotech(_session);
    1.33          free(_session);
    1.34  		return PEP_INIT_CANNOT_OPEN_SYSTEM_DB;
    1.35 @@ -245,8 +249,8 @@
    1.36  			sqlite3_close_v2(_session->system_db);
    1.37  		}
    1.38  
    1.39 +        release_transport_system(_session);
    1.40          release_cryptotech(_session);
    1.41 -        release_transport_system(_session);
    1.42      }
    1.43  	free(_session);
    1.44  }