NULL is ok, both for passing and for returning.
Don't free data after the code is done.
Generics and defining elements of containers and arrays.
Free data after the code is done.