NULL is OK, both for passing and for returning.
NULL may be passed as the value in, out, in-out; or as a return value.
The callback is valid only during the call to the method.
Free data container after the code is done.
Free data after the code is done.
Don't free data after the code is done.