libuv/src/unix
George Zhao d2482ae121
macos: fix memleaks in uv__get_cpu_speed
ERROR: LeakSanitizer: detected memory leaks

```
Direct leak of 432 byte(s) in 9 object(s) allocated from:
    #0 0x1062eedc2 in __sanitizer_mz_calloc+0x92 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x46dc2)
    #1 0x7fff20171eb6 in _malloc_zone_calloc+0x3a (libsystem_malloc.dylib:x86_64+0x1beb6)
    #2 0x7fff203ac180 in _CFRuntimeCreateInstance+0x124 (CoreFoundation:x86_64h+0x4180)
    #3 0x7fff203ab906 in __CFStringCreateImmutableFunnel3+0x84d (CoreFoundation:x86_64h+0x3906)
    #4 0x7fff203ab0a1 in CFStringCreateWithCString+0x48 (CoreFoundation:x86_64h+0x30a1)
    #5 0x1056f63e1 in uv__get_cpu_speed darwin.c:267
    #6 0x1056f491e in uv_cpu_info darwin.c:338
```

PR-URL: https://github.com/libuv/libuv/pull/3098
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2021-04-04 17:50:46 +02:00
..
aix-common.c aix: protect uv_exepath() from uv_set_process_title() 2020-08-10 11:27:30 -04:00
aix.c aix: protect uv_exepath() from uv_set_process_title() 2020-08-10 11:27:30 -04:00
android-ifaddrs.c android: fix OOB write in uv_interface_addresses() 2020-04-06 12:48:32 +02:00
async.c stream: add uv_pipe and uv_socketpair to the API 2020-11-09 21:50:09 -05:00
atomic-ops.h unix: implement cpu_relax() for arm 2020-04-14 15:30:30 +02:00
bsd-ifaddrs.c bsd-ifaddrs: improve comments 2020-11-26 00:49:10 -05:00
bsd-proctitle.c unix,win: add uv_library_shutdown() 2020-04-22 12:24:36 +02:00
core.c poll,unix: ensure safety of rapid fd reuse 2020-12-28 11:51:23 -05:00
cygwin.c src: move uv_free_cpu_info to uv-common.c 2019-08-19 23:01:17 +02:00
darwin-proctitle.c darwin: fix build with non-apple compilers 2020-04-28 20:07:59 +02:00
darwin-stub.h darwin: use IOKit for uv_cpu_info 2020-08-04 21:18:32 +02:00
darwin.c macos: fix memleaks in uv__get_cpu_speed 2021-04-04 17:50:46 +02:00
dl.c misc: remove unnecessary null pointer checks 2015-11-17 09:18:55 +01:00
freebsd.c linux: fix i386 sendmmsg/recvmmsg support 2020-09-20 12:22:33 -04:00
fs.c zos: don't use nanosecond timestamp fields 2021-02-15 17:18:09 +00:00
fsevents.c darwin: abort on pthread_attr_init fail 2021-04-04 17:35:14 +02:00
getaddrinfo.c test,sunos: fix statement not reached warnings 2019-03-16 13:22:16 -04:00
getnameinfo.c unix,win: limit concurrent DNS calls to nthreads/2 2018-08-21 10:48:24 +02:00
haiku.c src: move uv_free_cpu_info to uv-common.c 2019-08-19 23:01:17 +02:00
ibmi.c aix: protect uv_exepath() from uv_set_process_title() 2020-08-10 11:27:30 -04:00
internal.h unix: expose thread_stack_size() internally 2021-04-04 17:32:57 +02:00
kqueue.c core: add API to measure event loop idle time 2020-08-04 10:31:42 -04:00
linux-core.c unix: fix uv_uptime() regression 2020-12-30 13:13:58 +01:00
linux-inotify.c chore: use for(;;) instead of while 2021-04-04 17:15:35 +02:00
linux-syscalls.c android: add system call api guards 2020-11-05 16:00:46 -05:00
linux-syscalls.h linux: fix -Wincompatible-pointer-types warning 2020-11-05 09:33:09 +01:00
loop-watcher.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
loop.c core: add API to measure event loop idle time 2020-08-04 10:31:42 -04:00
netbsd.c unix: pass sysctl size arg using ARRAY_SIZE macro 2019-12-16 15:55:59 +01:00
no-fsevents.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
no-proctitle.c unix,win: add uv_library_shutdown() 2020-04-22 12:24:36 +02:00
openbsd.c src: add uv__reallocf() 2020-03-15 10:00:15 -04:00
os390-proctitle.c zos: use custom proctitle implementation 2021-02-15 17:18:59 +00:00
os390-syscalls.c chore: use for(;;) instead of while 2021-04-04 17:15:35 +02:00
os390-syscalls.h zos: use nanosleep() from zoslib 2021-02-15 17:18:30 +00:00
os390.c zos: use custom proctitle implementation 2021-02-15 17:18:59 +00:00
pipe.c stream: add uv_pipe and uv_socketpair to the API 2020-11-09 21:50:09 -05:00
poll.c poll,unix: ensure safety of rapid fd reuse 2020-12-28 11:51:23 -05:00
posix-hrtime.c unix: factor out reusable POSIX hrtime impl 2017-03-03 15:52:42 +01:00
posix-poll.c core: add API to measure event loop idle time 2020-08-04 10:31:42 -04:00
process.c zos: use execvpe() to set environ explictly 2021-02-15 17:18:49 +00:00
procfs-exepath.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
proctitle.c zos: use custom proctitle implementation 2021-02-15 17:18:59 +00:00
pthread-fixes.c unix: use relaxed loads/stores for feature checks 2020-06-16 11:42:51 +02:00
qnx.c build,unix: add QNX support 2020-09-22 23:14:46 -04:00
random-devurandom.c unix: handle uv__open_cloexec return value correctly 2020-01-21 20:02:56 +01:00
random-getentropy.c unix,win: add uv_random() 2019-09-18 08:09:14 +02:00
random-getrandom.c unix,win: add uv_random() 2019-09-18 08:09:14 +02:00
random-sysctl-linux.c netbsd: use KERN_ARND sysctl to get entropy 2019-10-29 13:36:05 +01:00
signal.c stream: add uv_pipe and uv_socketpair to the API 2020-11-09 21:50:09 -05:00
spinlock.h unix: add spinlock.h 2013-10-20 13:58:34 +02:00
stream.c chore: use for(;;) instead of while 2021-04-04 17:15:35 +02:00
sunos.c core: add API to measure event loop idle time 2020-08-04 10:31:42 -04:00
sysinfo-loadavg.c unix: factor out reusable sysinfo loadavg impl 2017-05-21 16:12:16 +02:00
sysinfo-memory.c unix: factor out reusable sysinfo memory lookup 2017-05-21 16:12:14 +02:00
tcp.c stream: add uv_pipe and uv_socketpair to the API 2020-11-09 21:50:09 -05:00
thread.c unix: expose thread_stack_size() internally 2021-04-04 17:32:57 +02:00
tty.c ibmi: Fix isatty EBADF handling and refactor 2020-04-06 05:58:34 -04:00
udp.c linux,udp: enable full ICMP error reporting 2021-02-17 10:29:53 +01:00