Checks for pointer in list when freeing