Objective-C : Incorrect malloc usage