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>
Daniel P. Berrangé committed
Jan 13, 2026 at 11:52 UTC
03eb6f411f37740dfb972c7fc1a194f3641db502
1 file changed
+1
util/log.c
+1
@@ -118,6 +118,7 @@ static FILE *qemu_log_trylock_with_err(Error **errp)
118
logfile = qatomic_rcu_read((void **)&global_file);
119
if (!logfile) {
120
rcu_read_unlock();
121
+ error_setg(errp, "Global log file output is not open");
122
return NULL;
123
}
124
}