Hotfix for #3528 Add strdup in uv_cpu_info

pull/24503/head
isaacs 2012-06-25 07:37:07 -07:00
parent 38250f6403
commit 9a7158de18
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
knp = (kstat_named_t *) kstat_data_lookup(ksp, (char *)"brand");
assert(knp->data_type == KSTAT_DATA_STRING);
cpu_info->model = KSTAT_NAMED_STR_PTR(knp);
cpu_info->model = strdup(KSTAT_NAMED_STR_PTR(knp));
}
lookup_instance++;