Reference count store structs when reloading from db.

Without this increment, a message could be incorrectly freed in rare
circumstances.
pull/211/merge
Roger A. Light 11 years ago
parent b52e3311d2
commit cfe1156eb7

@ -431,6 +431,7 @@ static int _db_client_msg_restore(struct mosquitto_db *db, const char *client_id
return 1;
}
cmsg->store = load->store;
cmsg->store->ref_count++;
context = _db_find_or_add_context(db, client_id, 0);
if(!context){

Loading…
Cancel
Save