From: Jaeyun Jung Date: Thu, 2 May 2024 06:28:16 +0000 (+0900) Subject: [CodeClean] check null before using handle X-Git-Tag: accepted/tizen/7.0/unified/20240509.012446^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=631dc84d7897cf891d276061d07fd0136e5e4915;p=platform%2Fcore%2Fapi%2Fmachine-learning.git [CodeClean] check null before using handle Code clean, check null pointer of train-offloading handle before using it. Signed-off-by: Jaeyun Jung --- diff --git a/c/src/ml-api-service-training-offloading.c b/c/src/ml-api-service-training-offloading.c index aebecb4..5edf3bf 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) {