Thanks to Daniel Degasperi.
@ -4,6 +4,7 @@
Broker:
- Fix possible memory leak when using a topic that has a leading slash. Fixes
bug #1360985.
- Fix saving persistent database on Windows.
Client library:
- Fix mutex being incorrectly passed by value. Fixes bug #1373785.
@ -402,6 +402,12 @@ int mqtt3_db_backup(struct mosquitto_db *db, bool cleanup, bool shutdown)
fclose(db_fptr);
#ifdef WIN32
if(remove(db->config->persistence_filepath) != 0){
goto error;
}
#endif
if(rename(outfile, db->config->persistence_filepath) != 0){