Fix memory leak when connecting clients rejected.

This commit is contained in:
Roger A. Light 2020-04-30 17:31:13 +01:00
parent 5908585afd
commit eeaafed485
2 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Broker:
- Fix `mosquitto_passwd -b` not updating passwords for existing users
correctly. Creating a new user with `-b` worked without problem.
Closes #1664.
- Fix memory leak when connecting clients rejected.
Client library:
- Don't treat an unexpected PUBACK, PUBREL, or PUBCOMP as a fatal error.

View File

@ -886,5 +886,7 @@ handle_connect_error:
if(client_cert) X509_free(client_cert);
#endif
/* We return an error here which means the client is freed later on. */
context->clean_start = true;
context->session_expiry_interval = 0;
return rc;
}