adpcm: convert VLAs to malloc/free