Subj : src/sbbs3/js_mqtt.c To : Git commit to main/sbbs/master From : Rob Swindell (on Windows 11) Date : Sun Feb 11 2024 09:47 pm https://gitlab.synchro.net/main/sbbs/-/commit/3a389c0ca6d2b8db6ce07a2b Modified Files: src/sbbs3/js_mqtt.c Log Message: Fix heap corruption in Windows builds This bug caused crashes in the Windows build of sbbs when using the ;spy sysop command with MQTT enabled. Memory that is allocated in one DLL (e.g. sbbs.dll) must be freed in that same DLL (e.g. sbbs.dll, not mosquitto.dll). mosquitto_message_free() here frees the msg pointer, but we didn't allocate it in mosquitto.dll in the first place, so that's wrong. The proper mosquitto function to use in this case is mosquitto_message_free_contents(). .