1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-04 17:47:03 +03:00

logind: propagate the right error, don't make up ENOMEM

This commit is contained in:
Lennart Poettering 2018-02-26 18:33:05 +01:00
parent 5d5330a8e4
commit e38aa66426

View File

@ -370,10 +370,8 @@ int session_device_new(Session *s, dev_t dev, bool open_device, SessionDevice **
goto error;
r = hashmap_put(s->devices, &sd->dev, sd);
if (r < 0) {
r = -ENOMEM;
if (r < 0)
goto error;
}
if (open_device) {
/* Open the device for the first time. We need a valid fd to pass back