Skip to content

Commit 9a7158d

Browse files
committed
Hotfix for #3528 Add strdup in uv_cpu_info
1 parent 38250f6 commit 9a7158d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/uv/src/unix/sunos.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
349349

350350
knp = (kstat_named_t *) kstat_data_lookup(ksp, (char *)"brand");
351351
assert(knp->data_type == KSTAT_DATA_STRING);
352-
cpu_info->model = KSTAT_NAMED_STR_PTR(knp);
352+
cpu_info->model = strdup(KSTAT_NAMED_STR_PTR(knp));
353353
}
354354

355355
lookup_instance++;

0 commit comments

Comments
 (0)