Skip to content

Commit

Permalink
libtrap - fix sending thread cleanup on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
SiskaPavel committed Sep 16, 2024
1 parent 9a39713 commit 83280d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions libtrap/src/ifc_tcpip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,12 +1213,10 @@ send_blocking_mode(void *arg)
__sync_add_and_fetch(&cl->container_id, 1);
}

pthread_exit(NULL);

cleanup:
disconnect_client(c, cl);
free(arg);
return NULL;
pthread_exit(NULL);
}

static void *
Expand Down Expand Up @@ -1314,12 +1312,10 @@ send_non_blocking_mode(void *arg)
}
}

pthread_exit(NULL);

cleanup:
disconnect_client(c, cl);
free(arg);
return NULL;
pthread_exit(NULL);
}

/**
Expand Down
8 changes: 2 additions & 6 deletions libtrap/src/ifc_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,12 +1351,10 @@ send_blocking_mode(void *arg)
__sync_add_and_fetch(&cl->container_id, 1);
}

pthread_exit(NULL);

cleanup:
disconnect_client(c, cl);
free(arg);
return NULL;
pthread_exit(NULL);
}

static void *
Expand Down Expand Up @@ -1449,12 +1447,10 @@ send_non_blocking_mode(void *arg)
}
}

pthread_exit(NULL);

cleanup:
disconnect_client(c, cl);
free(arg);
return NULL;
pthread_exit(NULL);
}


Expand Down

0 comments on commit 83280d4

Please sign in to comment.