[sr-dev] git:master:e8b916c9: Merge pull request #897 from giavac/master

GitHub noreply at github.com
Thu Dec 22 06:24:14 CET 2016


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

Author: Federico Cabiddu <federico.cabiddu at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2016-12-22T06:24:07+01:00

Merge pull request #897 from giavac/master

http_async_client: ensure username and password initialized

---

Modified: src/modules/http_async_client/async_http.c

---

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

---

diff --git a/src/modules/http_async_client/async_http.c b/src/modules/http_async_client/async_http.c
index e7089f1..f4b248d 100644
--- a/src/modules/http_async_client/async_http.c
+++ b/src/modules/http_async_client/async_http.c
@@ -281,6 +281,7 @@ void notification_socket_cb(int fd, short event, void *arg)
 		}
 	}
   
+	query_params.username = NULL;
 	if (aq->query_params.username) {
 		len = strlen(aq->query_params.username);
 		query_params.username = shm_malloc(len+1);
@@ -294,6 +295,7 @@ void notification_socket_cb(int fd, short event, void *arg)
 		query_params.username[len] = '\0';
 	}
 	
+	query_params.password = NULL;
 	if (aq->query_params.password) {
 		len = strlen(aq->query_params.password);
 		query_params.password = shm_malloc(len+1);




More information about the sr-dev mailing list