Added function to free linked list of heartbeats (lHeartbeat)