mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-02 19:22:47 -05:00
Handle null return from curl_easy_init
This commit is contained in:
@ -627,6 +627,10 @@ static BIO *bio_get_http_curl(long *http_code, char *url, BIO *req, char *proxy,
|
|||||||
/* Start a libcurl easy session and set options for a curl easy handle */
|
/* Start a libcurl easy session and set options for a curl easy handle */
|
||||||
printf("Connecting to %s\n", url);
|
printf("Connecting to %s\n", url);
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
|
if (!curl) {
|
||||||
|
fprintf(stderr, "CURL initialization failed\n");
|
||||||
|
return NULL; /* FAILED */
|
||||||
|
}
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
res = curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
|
res = curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
|
Reference in New Issue
Block a user