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:
parent
a7c54c8c1f
commit
0d1b9a9647
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user