Skip to content

Commit

Permalink
[CodeClean] check null before using handle
Browse files Browse the repository at this point in the history
Code clean, check null pointer of train-offloading handle before using it.

Signed-off-by: Jaeyun Jung <[email protected]>
  • Loading branch information
jaeyun-jung committed May 2, 2024
1 parent 55ea886 commit 631dc84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion c/src/ml-api-service-training-offloading.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 631dc84

Please sign in to comment.