Skip to content

Commit 631dc84

Browse files
committed
[CodeClean] check null before using handle
Code clean, check null pointer of train-offloading handle before using it. Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
1 parent 55ea886 commit 631dc84

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

c/src/ml-api-service-training-offloading.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,10 +655,11 @@ static gpointer
655655
_check_received_data_thread (gpointer data)
656656
{
657657
ml_training_services_s *training_s = (ml_training_services_s *) data;
658-
int usec = training_s->time_limit * 1000000;
658+
gint usec;
659659

660660
g_return_val_if_fail (training_s != NULL, NULL);
661661

662+
usec = training_s->time_limit * 1000000;
662663
while (usec > 0) {
663664
g_usleep (100000);
664665
if (training_s->receiver_pipe_json_str != NULL) {

0 commit comments

Comments
 (0)