From e3d00a228bfdc46750f70a9ba54d9777b8e83015 Mon Sep 17 00:00:00 2001 From: Giacomo Vacca Date: Wed, 21 Dec 2016 21:12:40 +0100 Subject: [PATCH] http_async_client: ensure username and password initialized --- src/modules/http_async_client/async_http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/http_async_client/async_http.c b/src/modules/http_async_client/async_http.c index e7089f1abbe..f4b248d8847 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);