mirror of
https://github.com/qemu/qemu.git
synced 2026-04-05 22:00:58 +00:00
util/log: add missing error reporting in qemu_log_trylock_with_err
One codepath that could return NULL failed to populate the errp object. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -118,6 +118,7 @@ static FILE *qemu_log_trylock_with_err(Error **errp)
|
||||
logfile = qatomic_rcu_read((void **)&global_file);
|
||||
if (!logfile) {
|
||||
rcu_read_unlock();
|
||||
error_setg(errp, "Global log file output is not open");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user