1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

bus: fix error check in memfd code

This commit is contained in:
Lennart Poettering 2013-05-10 19:15:55 +02:00
parent a7c54c8c1f
commit 0d1b9a9647

View File

@ -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)