diff options
author | default <nobody@localhost> | 2022-10-25 09:32:41 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-10-25 09:32:41 +0200 |
commit | fa870ab358ce94017228cdddf4697e041fc32531 (patch) | |
tree | 326d5a13a525531b4c5c243160d215d7c28263ae /xs_curl.h | |
parent | d2095105de3fe8c3397df7d46a9d61011b74c09e (diff) |
Backport from xs.
Diffstat (limited to 'xs_curl.h')
-rw-r--r-- | xs_curl.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -54,7 +54,7 @@ static int _data_callback(void *buffer, size_t size, /* open space */ pd->size += sz; - pd->data = realloc(pd->data, pd->size + 1); + pd->data = xs_realloc(pd->data, pd->size + 1); /* copy data */ memcpy(pd->data + pd->offset, buffer, sz); @@ -166,7 +166,7 @@ d_char *xs_http_request(char *method, char *url, d_char *headers, ipd.data[ipd.size] = '\0'; } else - free(ipd.data); + xs_free(ipd.data); return response; } |