Protect call of Socket_noPendingWrites() with socket_mutex to fix issue #385
It turned out in https://github.com/eclipse/paho.mqtt.c/issues/385 that Socket_getReadySocket() could remove a list element, which is currently in use by a function called by Socket_noPendingWirte(). And this leads to memory corruption or segmentation fault. To fix this, this call of Socket_PendingWrites() in MQTTAsync.c needs to be protected by mutex_socket. Signed-off-by:Juergen Kosel <juergen.kosel@softing.com>
Showing
Please
register
or
sign in
to comment