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

@ -214,7 +214,6 @@ int add_tcp_conncection(char *ipv4, int port) {
serv_addr.sin_port = htons(port);
struct network_con_s *tmp = tcp_list_contains_address(serv_addr);
dawn_regmem(tmp);
if (tmp != NULL) {
if(tmp->connected == true)
{
@ -223,7 +222,7 @@ int add_tcp_conncection(char *ipv4, int port) {
// Delete already existing entry
close(tmp->fd.fd);
list_del(&tmp->list);
dawn_free(tmp);
// TODO: Removed free(tmp) here - was it needed?
}
}