mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-21 12:24:29 +02:00
Assign to NULL to prevent double free later.
This commit is contained in:
parent
7a2dd634cb
commit
66443c14bd
|
|
@ -201,6 +201,7 @@ int mqtt3_handle_connect(struct mosquitto_db *db, struct mosquitto *context)
|
|||
goto handle_connect_error;
|
||||
}else{ /* mqtt311 */
|
||||
_mosquitto_free(client_id);
|
||||
client_id = NULL;
|
||||
|
||||
if(clean_session == 0 || db->config->allow_zero_length_clientid == false){
|
||||
_mosquitto_send_connack(context, 0, CONNACK_REFUSED_IDENTIFIER_REJECTED);
|
||||
|
|
|
|||
Loading…
Reference in a new issue