diff --git a/src/uv-common.c b/src/uv-common.c index 18fe90ee2..9b209c95d 100644 --- a/src/uv-common.c +++ b/src/uv-common.c @@ -197,13 +197,10 @@ uv_buf_t uv_buf_init(char* base, unsigned int len) { static const char* uv__unknown_err_code(int err) { - char buf[32]; - char* copy; + static char buf[32]; snprintf(buf, sizeof(buf), "Unknown system error %d", err); - copy = uv__strdup(buf); - - return copy != NULL ? copy : "Unknown system error"; + return buf; } #define UV_ERR_NAME_GEN_R(name, _) \