Properly free Vec<u8>s after conversion to byte[].