C Linked List valgrind Invalid Read of Size
I have a problem with my Linked List and the valgrind output. Without further adieu here is my linked list: typedef struct Map map; struct Map { void *address; double free_time; map* next; }*map_list; The list is created using a dummy head node. As you can see, the struct holds an address and a free time, which I try to associate them. In the find_and_free function I search this list using a time and if this time is smaller than the one stored in the list, I deallocate the saved address. And then I deallocate the list node as well. This is the function used to find any free time that is