File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
features/FEATURE_BLE/source/generic Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,14 @@ ble_error_t GenericSecurityManager::init(
42
42
bool signing,
43
43
const char * db_path
44
44
) {
45
-
46
45
ble_error_t result = _pal.initialize ();
46
+
47
47
if (result != BLE_ERROR_NONE) {
48
48
return result;
49
49
}
50
50
51
51
result = init_database (db_path);
52
+
52
53
if (result != BLE_ERROR_NONE) {
53
54
return result;
54
55
}
@@ -79,12 +80,17 @@ ble_error_t GenericSecurityManager::init(
79
80
init_signing ();
80
81
}
81
82
82
- init_resolving_list ();
83
-
84
83
_connection_monitor.set_connection_event_handler (this );
85
84
_signing_monitor.set_signing_event_handler (this );
86
85
_pal.set_event_handler (this );
87
86
87
+ result = init_resolving_list ();
88
+
89
+ if (result != BLE_ERROR_NONE) {
90
+ delete _db;
91
+ return result;
92
+ }
93
+
88
94
return BLE_ERROR_NONE;
89
95
}
90
96
@@ -766,9 +772,7 @@ ble_error_t GenericSecurityManager::oobReceived(
766
772
ble_error_t GenericSecurityManager::init_database (
767
773
const char *db_path
768
774
) {
769
- if (_db) {
770
- delete _db;
771
- }
775
+ delete _db;
772
776
773
777
FILE* db_file = FileSecurityDb::open_db_file (db_path);
774
778
You can’t perform that action at this time.
0 commit comments