Valgrind reports a race condition, when ProcessRunningEvent_Server_tep deletes the event where pthread_create has yet to write thread_send. ProcessRunningEvent_Client_tep looks as if it has the same problem on errors.
A solution could be to prevent the event from deconstructing with a mutex until pthread_create returns. Daniel
pgp35yRclXju0.pgp
Description: PGP signature