Skip to content

Commit

Permalink
Fix use after free (unreleased)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Nov 6, 2020
1 parent 255ae24 commit c5ba597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,10 +1018,10 @@ static int db__message_write_inflight_out_single(struct mosquitto_db *db, struct
}
if(now > msg->store->message_expiry_time){
/* Message is expired, must not send. */
db__message_remove(db, &context->msgs_out, msg);
if(msg->direction == mosq_md_out && msg->qos > 0){
util__increment_send_quota(context);
}
db__message_remove(db, &context->msgs_out, msg);
return MOSQ_ERR_SUCCESS;
}else{
expiry_interval = (uint32_t)(msg->store->message_expiry_time - now);
Expand Down

0 comments on commit c5ba597

Please sign in to comment.