Skip to content
  • Rob Swindell's avatar
    Fix heap corruption in Windows builds · ac2c00ae
    Rob Swindell authored
    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().
    ac2c00ae