summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/sntp/libevent/test/regress_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/sntp/libevent/test/regress_http.c')
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/ntp/sntp/libevent/test/regress_http.c b/contrib/ntp/sntp/libevent/test/regress_http.c
index 35f6dd7..147f6ff 100644
--- a/contrib/ntp/sntp/libevent/test/regress_http.c
+++ b/contrib/ntp/sntp/libevent/test/regress_http.c
@@ -367,6 +367,10 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
struct timeval when = { 0, 0 };
struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state));
event_debug(("%s: called\n", __func__));
+ if (state == NULL) {
+ fprintf(stderr, "Unable to allocate memory in http_chunked_cb()\n");
+ exit(1);
+ }
memset(state, 0, sizeof(struct chunk_req_state));
state->req = req;
OpenPOWER on IntegriCloud