Module: kamailio Branch: master Commit: c0aa4397d3c3158800d4a6af941c06b49dc21d8f URL: https://github.com/kamailio/kamailio/commit/c0aa4397d3c3158800d4a6af941c06b4...
Author: Henning Westerholt hw@skalatan.de Committer: Henning Westerholt hw@skalatan.de Date: 2019-11-23T22:55:44+01:00
http_async_client: use core string handling instead of redundant implementation
---
Modified: src/modules/http_async_client/http_multi.c
---
Diff: https://github.com/kamailio/kamailio/commit/c0aa4397d3c3158800d4a6af941c06b4... Patch: https://github.com/kamailio/kamailio/commit/c0aa4397d3c3158800d4a6af941c06b4...
---
diff --git a/src/modules/http_async_client/http_multi.c b/src/modules/http_async_client/http_multi.c index 948171b519..b5c2e8d637 100644 --- a/src/modules/http_async_client/http_multi.c +++ b/src/modules/http_async_client/http_multi.c @@ -352,16 +352,9 @@ static void *curl_shm_calloc(size_t nmemb, size_t size)
static char *curl_shm_strdup(const char *cp) { - char *rval; - int len; + char *p = shm_char_dup(cp);
- len = strlen(cp) + 1; - rval = shm_malloc(len); - if (!rval) - return NULL; - - memcpy(rval, cp, len); - return rval; + return p; }
void set_curl_mem_callbacks(void)