add memset and free for testSprintf