sd-bus: fix invalid fcntl() argument and error handling

Fixes 40164c2ceb.

(cherry picked from commit 4738dd120d)
(cherry picked from commit e8d4909b44)
(cherry picked from commit f57474169d)
This commit is contained in:
Yu Watanabe authored and Luca Boccassi committed 2026-10-17 14:45:51 +01:00
1 parent 4dfe6ecd97
commit ffba5ea2c5
1 file changed
+3 -3
+3 -3
View File
@@ -2211,7 +2211,7 @@ _public_ int sd_bus_message_append_array_memfd(
copy_fd = fcntl(memfd, F_DUPFD_CLOEXEC, 3);
if (copy_fd < 0)
return copy_fd;
return -errno;
r = memfd_get_size(memfd, &real_size);
if (r < 0)
@@ -2284,9 +2284,9 @@ _public_ int sd_bus_message_append_string_memfd(
if (r < 0)
return r;
copy_fd = fcntl(memfd, FD_CLOEXEC, 3);
copy_fd = fcntl(memfd, F_DUPFD_CLOEXEC, 3);
if (copy_fd < 0)
return copy_fd;
return -errno;
r = memfd_get_size(memfd, &real_size);
if (r < 0)