Fix incorrect memory free when finding duplicate username

Fix oss-fuzz #468922225. Unreleased changes.
This commit is contained in:
Roger A. Light
2026-01-06 16:31:30 +00:00
parent 9a88cf8dde
commit d2eb276f34

View File

@@ -74,6 +74,7 @@ int password_file__parse(struct password_file_data *data)
HASH_FIND(hh, data->unpwd, username, strlen(username), unpwd);
if(unpwd){
unpwd = NULL;
mosquitto_log_printf(MOSQ_LOG_ERR, "password-file: Error: Duplicate user '%s' in password file '%s'.", username, data->password_file);
goto error;
}