[sr-dev] git:master:c0aa4397: http_async_client: use core string handling instead of redundant implementation
Henning Westerholt
hw at skalatan.de
Sat Nov 23 23:23:31 CET 2019
Module: kamailio
Branch: master
Commit: c0aa4397d3c3158800d4a6af941c06b49dc21d8f
URL: https://github.com/kamailio/kamailio/commit/c0aa4397d3c3158800d4a6af941c06b49dc21d8f
Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at 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/c0aa4397d3c3158800d4a6af941c06b49dc21d8f.diff
Patch: https://github.com/kamailio/kamailio/commit/c0aa4397d3c3158800d4a6af941c06b49dc21d8f.patch
---
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)
More information about the sr-dev
mailing list