From: Yu Watanabe Date: Fri, 11 Apr 2025 00:11:05 +0000 (+0900) Subject: locale-util: fix argument for munmap() X-Git-Tag: v258-rc1~829^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90abb64fd508e8efd937178b3379a62ac97b49ec;p=thirdparty%2Fsystemd.git locale-util: fix argument for munmap() --- diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c index c7095ece239..45ba70f04d7 100644 --- a/src/basic/locale-util.c +++ b/src/basic/locale-util.c @@ -97,7 +97,6 @@ static int add_locales_from_archive(Set *locales) { const struct namehashent *e; const void *p = MAP_FAILED; _cleanup_close_ int fd = -EBADF; - size_t sz = 0; struct stat st; int r; @@ -154,9 +153,9 @@ static int add_locales_from_archive(Set *locales) { r = 0; - finish: +finish: if (p != MAP_FAILED) - munmap((void*) p, sz); + munmap((void*) p, st.st_size); return r; }