chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: relax udev rules matching devices logind watches for
[elogind.git]
/
src
/
login
/
logind-device.c
diff --git
a/src/login/logind-device.c
b/src/login/logind-device.c
index eb5edd1cd5e11d2ce8ef2731668a1e65701497ad..6537fa04bfcbd6685fa5132d28ca508aea81b591 100644
(file)
--- a/
src/login/logind-device.c
+++ b/
src/login/logind-device.c
@@
-34,15
+34,12
@@
Device* device_new(Manager *m, const char *sysfs, bool master) {
return NULL;
d->sysfs = strdup(sysfs);
return NULL;
d->sysfs = strdup(sysfs);
- if (!d->sysfs) {
- free(d);
- return NULL;
- }
+ if (!d->sysfs)
+ return mfree(d);
if (hashmap_put(m->devices, d->sysfs, d) < 0) {
free(d->sysfs);
if (hashmap_put(m->devices, d->sysfs, d) < 0) {
free(d->sysfs);
- free(d);
- return NULL;
+ return mfree(d);
}
d->manager = m;
}
d->manager = m;