Parameter points to an array of items.
NULL is ok, both for passing and for returning.
Free data after the code is done.
Don't free data after the code is done.