If you alloc here, I think you should free that memory before exiting the function.