Using malloc for no good reason