From 631dc84d7897cf891d276061d07fd0136e5e4915 Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Thu, 2 May 2024 15:28:16 +0900 Subject: [PATCH] [CodeClean] check null before using handle Code clean, check null pointer of train-offloading handle before using it. Signed-off-by: Jaeyun Jung --- c/src/ml-api-service-training-offloading.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/c/src/ml-api-service-training-offloading.c b/c/src/ml-api-service-training-offloading.c index aebecb47..5edf3bf6 100644 --- a/c/src/ml-api-service-training-offloading.c +++ b/c/src/ml-api-service-training-offloading.c @@ -655,10 +655,11 @@ static gpointer _check_received_data_thread (gpointer data) { ml_training_services_s *training_s = (ml_training_services_s *) data; - int usec = training_s->time_limit * 1000000; + gint usec; g_return_val_if_fail (training_s != NULL, NULL); + usec = training_s->time_limit * 1000000; while (usec > 0) { g_usleep (100000); if (training_s->receiver_pipe_json_str != NULL) {