le_device_db_tlv: check if entry exists before decreasing count

This commit is contained in:
Matthias Ringwald 2018-03-15 17:37:26 +01:00
parent 86099d9313
commit 75130320d7

View File

@ -175,6 +175,9 @@ int le_device_db_max_count(void){
}
void le_device_db_remove(int index){
// check if entry exists
if (entry_map[index] == 0) return;
// delete entry in TLV
le_device_db_tlv_delete(index);