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


Reply via email to