Fix potential leak.

pull/1203/head
Roger A. Light 7 years ago
parent c90bd4e0c6
commit 8024a30d1d

@ -236,6 +236,7 @@ static int callback_mqtt(struct libwebsocket_context *context,
if(db->config->connection_messages == true){
log__printf(NULL, MOSQ_LOG_NOTICE, "Client connection from %s denied: max_connections exceeded.", mosq->address);
}
mosquitto__free(mosq->address);
mosquitto__free(mosq);
u->mosq = NULL;
return -1;

Loading…
Cancel
Save