[APPHELP_APITEST] Properly handle a couple 'malloc()/free()' (#2898)