On a Monday in 2020, Ryan Gahagan wrote:
From: Barrett Schonefeld <bscho...@utexas.edu>

- src/util/virlog.c

Signed-off-by: Barrett Schonefeld <bscho...@utexas.edu>
---
src/util/virlog.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index e12fd58831..2bf606b8c5 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -528,7 +528,8 @@ virLogVMessage(virLogSourcePtr source,
    if (source->serial < virLogFiltersSerial)
        virLogSourceUpdate(source);
    if (priority < source->priority)
-        goto cleanup;
+        errno = saved_errno;
+        return;

    /*
     * serialize the error message, add level and timestamp
@@ -601,8 +602,6 @@ virLogVMessage(virLogSourcePtr source,
                         str, msg, (void *) STDERR_FILENO);
    }
    virLogUnlock();
- cleanup:

-    errno = saved_errno;

This code is also executed for code paths that fall through
the cleanup label, it cannot be removed.

}


--
2.29.0

Attachment: signature.asc
Description: PGP signature

Reply via email to