This was the only place in debuginfod-client.c where we didn't check
the result of curl_easy_getinfo. Just check it to make things consistent.
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2022-05-09 Mark Wielaard <mark@klomp.org>
+
+ * debuginfod-client.c (debuginfod_write_callback): Check result
+ of curl_easy_getinfo.
+
2022-05-05 Mark Wielaard <mark@klomp.org>
* debuginfod.cxx (main): Define use_epoll. Set to MHD_USE_EPOLL
*d->target_handle = d->handle;
/* update the client object */
const char *url = NULL;
- (void) curl_easy_getinfo (d->handle, CURLINFO_EFFECTIVE_URL, &url);
- if (url)
+ CURLcode curl_res = curl_easy_getinfo (d->handle,
+ CURLINFO_EFFECTIVE_URL, &url);
+ if (curl_res == CURLE_OK && url)
{
free (d->client->url);
d->client->url = strdup(url); /* ok if fails */