Fix potential leak.
This commit is contained in:
parent
58c857c473
commit
7fb629d818
@ -92,6 +92,7 @@ int mqtt3_bridge_new(struct mosquitto_db *db, struct _mqtt3_bridge *bridge)
|
||||
/* id wasn't found, so generate a new context */
|
||||
new_context = mqtt3_context_init(db, -1);
|
||||
if(!new_context){
|
||||
_mosquitto_free(local_id);
|
||||
return MOSQ_ERR_NOMEM;
|
||||
}
|
||||
new_context->id = local_id;
|
||||
|
Loading…
Reference in New Issue
Block a user