[PULL 17/27] util/log: add missing error reporting in qemu_log_trylock_with_err
Daniel P. Berrangé <[email protected]> Thu, 5 Mar 2026 17:47:33 +0000
| Newsgroups | org.nongnu.qemu-rust,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
One codepath that could return NULL failed to populate the errp object. Reported-by: Markus Armbruster <[email protected]> Signed-off-by: Daniel P. Berrangé <[email protected]> --- util/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/log.c b/util/log.c index 66f6dd5eec..7cffbc1bf8 100644 --- a/util/log.c +++ b/util/log.c @@ -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; } } -- 2.53.0