Skip to content
Snippets Groups Projects
Commit 38f421b3 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed use after free in api error handling

parent 376edfcf
Branches
No related tags found
No related merge requests found
......@@ -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
free(url);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment