summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-10 19:15:55 +0200
committerLennart Poettering <lennart@poettering.net>2013-05-10 19:15:55 +0200
commit0d1b9a964746336bc7e493ee82ad6cf1bdf49dbb (patch)
tree8d6822037d9586706abaa907a0ad780fba944796 /src
parenta7c54c8c1fc4101e784c101e680975f2143381ce (diff)
bus: fix error check in memfd code
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/sd-memfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/sd-memfd.c b/src/libsystemd-bus/sd-memfd.c
index 98a8e0893a..2712a26f66 100644
--- a/src/libsystemd-bus/sd-memfd.c
+++ b/src/libsystemd-bus/sd-memfd.c
@@ -43,7 +43,7 @@ int sd_memfd_new(sd_memfd **m) {
return -EINVAL;
kdbus = open("/dev/kdbus/control", O_RDWR|O_NOCTTY|O_CLOEXEC);
- if (fd < 0)
+ if (kdbus < 0)
return -errno;
if (ioctl(kdbus, KDBUS_CMD_MEMFD_NEW, &fd) < 0)