The name field of struct PathCache is not allocated. It should not try to free it by free(nc->name) Close #I3NTH9