diff --git a/lib/core/private.h b/lib/core/private.h index 5d93c7a72..0389d1e0d 100644 --- a/lib/core/private.h +++ b/lib/core/private.h @@ -1597,6 +1597,9 @@ void lws_free(void *p); #define lws_free_set_NULL(P) do { lws_realloc(P, 0, "free"); (P) = NULL; } while(0) #endif +char * +lws_strdup(const char *s); + int lws_plat_pipe_create(struct lws *wsi); int diff --git a/lib/roles/http/client/client-handshake.c b/lib/roles/http/client/client-handshake.c index e0aa43d9b..58a672062 100644 --- a/lib/roles/http/client/client-handshake.c +++ b/lib/roles/http/client/client-handshake.c @@ -162,7 +162,7 @@ create_new_conn: if (!wsi->client_hostname_copy) wsi->client_hostname_copy = - strdup(lws_hdr_simple_ptr(wsi, + lws_strdup(lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_PEER_ADDRESS)); /* @@ -846,7 +846,7 @@ html_parser_cb(const hubbub_token *token, void *pw) #endif -static char * +char * lws_strdup(const char *s) { char *d = lws_malloc(strlen(s) + 1, "strdup");