darwin: fix -Wsometimes-uninitialized warning

PR-URL: https://github.com/libuv/libuv/pull/3190
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
twosee 2021-05-28 22:52:58 +08:00 committed by GitHub
parent 385b7960a0
commit 6085bcef8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,12 +302,13 @@ static int uv__get_cpu_speed(uint64_t* speed) {
pIOObjectRelease(it);
err = 0;
out:
if (device_type_str != NULL)
pCFRelease(device_type_str);
if (clock_frequency_str != NULL)
pCFRelease(clock_frequency_str);
out:
if (core_foundation_handle != NULL)
dlclose(core_foundation_handle);