Fix potential leak.

This commit is contained in:
Roger A. Light 2014-09-19 00:56:37 +01:00
parent 58c857c473
commit 7fb629d818

View File

@ -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;