result = u16_normalize (UNINORM_NFKD, input, input_length, preallocated, &length);
if (!(result != NULL))
return 8;
- if (!(result == preallocated))
+ if (!(preallocated == NULL || result == preallocated))
return 9;
if (!(length == expected_length))
return 10;