Deallocate the result of mach_host_self() when done with it, fixing a
port leak.

The port rights obtained by mach_host_self() and mach_thread_self() need
to be deallocated with mach_port_deallocate(). They consume finite
system-wide resources. This is in contrast to mach_task_self(), which is
a macro that wraps an extern global variable, and must not be
deallocated.

http://crbug.com/105513 shows the sorts of problems that can occur when
these aren't properly deallocated.

R=fischman@webrtc.org, tkchin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/15469004

Patch from Mark Mentovai <mark@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@6131 4adac7df-926f-26a2-2b94-8c16560cd09d
1 file changed