summaryrefslogtreecommitdiffstats
path: root/src/basic/log.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-09-01 09:17:08 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-09-01 22:45:09 +0200
commit382886fe1169a917b273fad2136fee241505e789 (patch)
treeb2d259dbd5c28191018150045bbbe3bc053480cc /src/basic/log.c
parentlog: introduce log_syntax_parse_error() (diff)
downloadsystemd-382886fe1169a917b273fad2136fee241505e789.tar.xz
systemd-382886fe1169a917b273fad2136fee241505e789.zip
log: protect errno from log_syntax_invalid_utf8_internal()
Potentially, utf8_escape_invalid() called by log_syntax_invalid_utf8_internal() may update errno.
Diffstat (limited to '')
-rw-r--r--src/basic/log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index 80789ed2f0..c3e61ab5d4 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -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)