diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/npassd/collection.c | 15 | ||||
-rw-r--r-- | src/npassd/session.c | 13 |
2 files changed, 10 insertions, 18 deletions
diff --git a/src/npassd/collection.c b/src/npassd/collection.c index 48167bf..6fecf16 100644 --- a/src/npassd/collection.c +++ b/src/npassd/collection.c @@ -45,17 +45,12 @@ static void collection_free(struct collection *c) if (c == NULL) return; - if (c->slot != NULL) - sd_bus_slot_unref(c->slot); - if (c->path != NULL) - free(c->path); - if (c->alias != NULL) - free(c->alias); - if (c->label != NULL) - free(c->label); - if (c->root != NULL) - free(c->root); + sd_bus_slot_unref(c->slot); + free(c->path); + free(c->alias); + free(c->label); + free(c->root); free(c); } diff --git a/src/npassd/session.c b/src/npassd/session.c index 52f8476..45783ab 100644 --- a/src/npassd/session.c +++ b/src/npassd/session.c @@ -85,14 +85,11 @@ void session_free(struct session *s) if (s == NULL) return; - if (s->slot_singal != NULL) - sd_bus_slot_unref(s->slot_singal); - if (s->slot != NULL) - sd_bus_slot_unref(s->slot); - if (s->owner != NULL) - free(s->owner); - if (s->path != NULL) - free(s->path); + sd_bus_slot_unref(s->slot_singal); + sd_bus_slot_unref(s->slot); + + free(s->owner); + free(s->path); free(s); } |