From 9a7158de18abe1d423d3e12b97f79a628e4a8dbd Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 25 Jun 2012 07:37:07 -0700 Subject: [PATCH] Hotfix for #3528 Add strdup in uv_cpu_info --- deps/uv/src/unix/sunos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c index 906e69fba8c..261d69d47b5 100644 --- a/deps/uv/src/unix/sunos.c +++ b/deps/uv/src/unix/sunos.c @@ -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++;