Skip to content

Commit 17e8ed9

Browse files
forward resolving list init
1 parent cd9f12a commit 17e8ed9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ ble_error_t GenericSecurityManager::init(
4242
bool signing,
4343
const char* db_path
4444
) {
45-
4645
ble_error_t result = _pal.initialize();
46+
4747
if (result != BLE_ERROR_NONE) {
4848
return result;
4949
}
5050

5151
result = init_database(db_path);
52+
5253
if (result != BLE_ERROR_NONE) {
5354
return result;
5455
}
@@ -79,12 +80,17 @@ ble_error_t GenericSecurityManager::init(
7980
init_signing();
8081
}
8182

82-
init_resolving_list();
83-
8483
_connection_monitor.set_connection_event_handler(this);
8584
_signing_monitor.set_signing_event_handler(this);
8685
_pal.set_event_handler(this);
8786

87+
result = init_resolving_list();
88+
89+
if (result != BLE_ERROR_NONE) {
90+
delete _db;
91+
return result;
92+
}
93+
8894
return BLE_ERROR_NONE;
8995
}
9096

@@ -766,9 +772,7 @@ ble_error_t GenericSecurityManager::oobReceived(
766772
ble_error_t GenericSecurityManager::init_database(
767773
const char *db_path
768774
) {
769-
if (_db) {
770-
delete _db;
771-
}
775+
delete _db;
772776

773777
FILE* db_file = FileSecurityDb::open_db_file(db_path);
774778

0 commit comments

Comments
 (0)