projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12e4b4f
)
[runtime] Fix the leaking of mach ports introduced by 98bbf8512aec0fa01b4426583280f6d...
author
Zoltan Varga
<vargaz@gmail.com>
Fri, 15 Aug 2014 13:56:47 +0000
(09:56 -0400)
committer
Zoltan Varga
<vargaz@gmail.com>
Fri, 15 Aug 2014 13:56:47 +0000
(09:56 -0400)
mono/utils/mono-proclib.c
patch
|
blob
|
history
diff --git
a/mono/utils/mono-proclib.c
b/mono/utils/mono-proclib.c
index 279db86d96da59151341601fa355434a40b51815..3f032f9d22c321ff8bd4627d2459557c54c5756b 100644
(file)
--- a/
mono/utils/mono-proclib.c
+++ b/
mono/utils/mono-proclib.c
@@
-417,7
+417,8
@@
get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul
}
if (task_info (task, TASK_BASIC_INFO, (task_info_t)&t_info, &th_count) != KERN_SUCCESS) {
- mach_port_deallocate (mach_task_self (), task);
+ if (pid != getpid ())
+ mach_port_deallocate (mach_task_self (), task);
RET_ERROR (MONO_PROCESS_ERROR_OTHER);
}
@@
-430,7
+431,8
@@
get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul
else
ret = 0;
- mach_port_deallocate (mach_task_self (), task);
+ if (pid != getpid ())
+ mach_port_deallocate (mach_task_self (), task);
return ret;
#else