aboutsummaryrefslogtreecommitdiff
path: root/sntp/libevent/test/bench_httpclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'sntp/libevent/test/bench_httpclient.c')
-rw-r--r--sntp/libevent/test/bench_httpclient.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sntp/libevent/test/bench_httpclient.c b/sntp/libevent/test/bench_httpclient.c
index 22f174da5b66..1573e365bfd4 100644
--- a/sntp/libevent/test/bench_httpclient.c
+++ b/sntp/libevent/test/bench_httpclient.c
@@ -159,6 +159,10 @@ launch_request(void)
}
ri = malloc(sizeof(*ri));
+ if (ri == NULL) {
+ printf("Unable to allocate memory in launch_request()\n");
+ return -1;
+ }
ri->n_read = 0;
evutil_gettimeofday(&ri->started, NULL);