Commit 38f421b3 authored by Julian Rother's avatar Julian Rother

Fixed use after free in api error handling

parent 376edfcf
......@@ -49,13 +49,13 @@ int ping_job(int id, char *state, char *status, ...)
curl_easy_setopt(curl, CURLOPT_URL, url);
ret = curl_easy_perform(curl);
free(p);
free(url);
curl_easy_cleanup(curl);
if (ret)
{
fprintf(stderr, "API call to \"%s\" failed: %s\n", url, curl_easy_strerror(ret));
free(url);
return -1;
}
else
return 0;
free(url);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment