summaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/vcl
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-08-22 23:17:54 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2023-09-13 15:51:17 +0000
commit4cae8f9bee5f295f88090cd9a035f18b4899aa1d (patch)
treede45038d8a7e69268e9487e16997d4d88fb8df24 /src/plugins/hs_apps/vcl
parent7f9b690b06571da41400925c17b2e7de86f746f6 (diff)
hsa: fix coverity issue CID-313635
Type: fix Change-Id: Ieb50ab548bb34bdbb44d973037ee452d48f412ea Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/plugins/hs_apps/vcl')
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test_client.c8
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test_server.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/hs_apps/vcl/vcl_test_client.c b/src/plugins/hs_apps/vcl/vcl_test_client.c
index ae05961e655..1962e810fce 100644
--- a/src/plugins/hs_apps/vcl/vcl_test_client.c
+++ b/src/plugins/hs_apps/vcl/vcl_test_client.c
@@ -821,8 +821,12 @@ vtc_stream_client (vcl_test_client_main_t * vcm)
for (i = 1; i < vcm->n_workers; i++)
{
wrk = &vcm->workers[i];
- pthread_create (&wrk->thread_handle, NULL, vtc_worker_loop,
- (void *) wrk);
+ if (pthread_create (&wrk->thread_handle, NULL, vtc_worker_loop,
+ (void *) wrk))
+ {
+ vtwrn ("pthread_create failed -- aborting!");
+ return;
+ }
}
vtc_worker_loop (&vcm->workers[0]);
diff --git a/src/plugins/hs_apps/vcl/vcl_test_server.c b/src/plugins/hs_apps/vcl/vcl_test_server.c
index b4ec0a6e595..b7731d365d0 100644
--- a/src/plugins/hs_apps/vcl/vcl_test_server.c
+++ b/src/plugins/hs_apps/vcl/vcl_test_server.c
@@ -862,6 +862,8 @@ main (int argc, char **argv)
vsm->workers[i].wrk_index = i;
rv = pthread_create (&vsm->workers[i].thread_handle, NULL,
vts_worker_loop, (void *) &vsm->workers[i]);
+ if (rv)
+ vtfail ("pthread_create()", rv);
}
vts_worker_loop (&vsm->workers[0]);