diff options
Diffstat (limited to 'deps/uv/src/unix/sunos.c')
-rw-r--r-- | deps/uv/src/unix/sunos.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c index c41d0f0e52..05b7a11403 100644 --- a/deps/uv/src/unix/sunos.c +++ b/deps/uv/src/unix/sunos.c @@ -433,7 +433,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, } uv__handle_start(handle); - handle->path = strdup(path); + handle->path = uv__strdup(path); handle->fd = PORT_UNUSED; handle->cb = cb; @@ -463,7 +463,7 @@ int uv_fs_event_stop(uv_fs_event_t* handle) { } handle->fd = PORT_DELETED; - free(handle->path); + uv__free(handle->path); handle->path = NULL; handle->fo.fo_name = NULL; uv__handle_stop(handle); @@ -582,7 +582,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { lookup_instance++; } - *cpu_infos = malloc(lookup_instance * sizeof(**cpu_infos)); + *cpu_infos = uv__malloc(lookup_instance * sizeof(**cpu_infos)); if (!(*cpu_infos)) { kstat_close(kc); return -ENOMEM; @@ -605,7 +605,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { knp = kstat_data_lookup(ksp, (char*) "brand"); assert(knp->data_type == KSTAT_DATA_STRING); - cpu_info->model = strdup(KSTAT_NAMED_STR_PTR(knp)); + cpu_info->model = uv__strdup(KSTAT_NAMED_STR_PTR(knp)); } lookup_instance++; @@ -659,10 +659,10 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { int i; for (i = 0; i < count; i++) { - free(cpu_infos[i].model); + uv__free(cpu_infos[i].model); } - free(cpu_infos); + uv__free(cpu_infos); } @@ -692,7 +692,7 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { (*count)++; } - *addresses = malloc(*count * sizeof(**addresses)); + *addresses = uv__malloc(*count * sizeof(**addresses)); if (!(*addresses)) return -ENOMEM; @@ -705,7 +705,7 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { if (ent->ifa_addr == NULL) continue; - address->name = strdup(ent->ifa_name); + address->name = uv__strdup(ent->ifa_name); if (ent->ifa_addr->sa_family == AF_INET6) { address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); @@ -756,8 +756,8 @@ void uv_free_interface_addresses(uv_interface_address_t* addresses, int i; for (i = 0; i < count; i++) { - free(addresses[i].name); + uv__free(addresses[i].name); } - free(addresses); + uv__free(addresses); } |