NULL is ok, both for passing and for returning.
Parameter for input. Default is transfer none.
Don't free data after the code is done.