Documentation fixes.
Fix memory leak
Fix double free
Bad size_of
Fixed potential null dereference