Fix wrong return value from LUKS2_generate_hdr on error.
On rare occasion (low memory) the function could return success even though LUKS2 json metadata could be assembled properly.
On rare occasion (low memory) the function could return success even though LUKS2 json metadata could be assembled properly.