[PATCH v6 13/27] util/log: add missing error reporting in qemu_log_trylock_with_err
Daniel P. Berrangé <[email protected]> Wed, 11 Feb 2026 15:24:54 +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 1644e6814b..1c9c7adb2d 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