NULL may be passed as the value in, out, in-out; or as a return value.
The caller owns the data, and is responsible for free it.