diff options
| author | 2022-10-25 09:32:41 +0200 | |
|---|---|---|
| committer | 2022-10-25 09:32:41 +0200 | |
| commit | fa870ab358ce94017228cdddf4697e041fc32531 (patch) | |
| tree | 326d5a13a525531b4c5c243160d215d7c28263ae /xs_curl.h | |
| parent | Don't load unneeded actor info in html_entry(). (diff) | |
| download | snac2-fa870ab358ce94017228cdddf4697e041fc32531.tar.gz snac2-fa870ab358ce94017228cdddf4697e041fc32531.tar.xz snac2-fa870ab358ce94017228cdddf4697e041fc32531.zip | |
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, | |||
| 54 | 54 | ||
| 55 | /* open space */ | 55 | /* open space */ |
| 56 | pd->size += sz; | 56 | pd->size += sz; |
| 57 | pd->data = realloc(pd->data, pd->size + 1); | 57 | pd->data = xs_realloc(pd->data, pd->size + 1); |
| 58 | 58 | ||
| 59 | /* copy data */ | 59 | /* copy data */ |
| 60 | memcpy(pd->data + pd->offset, buffer, sz); | 60 | memcpy(pd->data + pd->offset, buffer, sz); |
| @@ -166,7 +166,7 @@ d_char *xs_http_request(char *method, char *url, d_char *headers, | |||
| 166 | ipd.data[ipd.size] = '\0'; | 166 | ipd.data[ipd.size] = '\0'; |
| 167 | } | 167 | } |
| 168 | else | 168 | else |
| 169 | free(ipd.data); | 169 | xs_free(ipd.data); |
| 170 | 170 | ||
| 171 | return response; | 171 | return response; |
| 172 | } | 172 | } |