s/the contents of it/its contents/.
Please make clear that the caller is responsible for free()ing the returned pointer at some point; and mark the declaration of the function with FUNC_WARN_UNUSED_RESULT.