memory auditing: bug fixes to memory auditing and hearing map

memory auditing: refined auditing code and use in main code
hearing map: fixed bug causing it not be be built correctly
datastorage: fixed memory leak from linked list handling
This commit is contained in:
Ian Clowes 2020-08-03 19:02:02 +01:00 committed by Polynomialdivision
parent d56c5c4e15
commit 34da5328f6
8 changed files with 113 additions and 97 deletions

View file

@ -428,7 +428,9 @@ dump_client(struct blob_attr** tb, struct dawn_mac client_addr, const char* bssi
client_entry->time = time(0);
pthread_mutex_lock(&client_array_mutex);
insert_client_to_array(client_entry);
// If entry was akraedy in list it won't be added, so free memorY
if (client_entry != insert_client_to_array(client_entry))
dawn_free(client_entry);
pthread_mutex_unlock(&client_array_mutex);
}