Question is, why are you using malloc() and free()?