do not pass freed pointer to caller

Is there a good reason to not set *result = NULL after freeing it?  It is confusing for the caller to get a pointer back that has already been freed.