log: protect errno from log_syntax_invalid_utf8_internal()

Potentially, utf8_escape_invalid() called by
log_syntax_invalid_utf8_internal() may update errno.
This commit is contained in:
Yu Watanabe
2024-09-02 05:45:09 +09:00
parent 1e04eb00f7
commit 382886fe11
+1
View File
@@ -1679,6 +1679,7 @@ int log_syntax_invalid_utf8_internal(
const char *func,
const char *rvalue) {
PROTECT_ERRNO;
_cleanup_free_ char *p = NULL;
if (rvalue)