Module: kamailio
Branch: master
Commit: 7ebb826040d63b4d55f11fb685a6c201739cd4b2
URL: 
https://github.com/kamailio/kamailio/commit/7ebb826040d63b4d55f11fb685a6c201739cd4b2

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-01-27T14:20:31+01:00

xcap_client: check return for curl_easy_init()

---

Modified: src/modules/xcap_client/xcap_functions.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/7ebb826040d63b4d55f11fb685a6c201739cd4b2.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7ebb826040d63b4d55f11fb685a6c201739cd4b2.patch

---

diff --git a/src/modules/xcap_client/xcap_functions.c 
b/src/modules/xcap_client/xcap_functions.c
index 0c67b44cfb4..1ccf369b21c 100644
--- a/src/modules/xcap_client/xcap_functions.c
+++ b/src/modules/xcap_client/xcap_functions.c
@@ -471,6 +471,10 @@ char *send_http_get(char *path, unsigned int xcap_port, 
char *match_etag,
        }
 
        curl_handle = curl_easy_init();
+       if(curl_handle == NULL) {
+               LM_ERR("curl_easy_init() failed\n");
+               return NULL;
+       }
 
        curl_easy_setopt(curl_handle, CURLOPT_URL, path);
 

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to