aboutsummaryrefslogtreecommitdiff
path: root/src/npassd/session.c
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-29 07:56:55 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-29 07:59:25 +0530
commitcd4036cb63d19296476e1e91056a6524ade9bbbc (patch)
treeba1f3424c9e2d7854460ff15622f9410c22e7cca /src/npassd/session.c
parentda21dd57634aebffe0f5833b598e1128fafc0def (diff)
c: don't NULL check before free
Diffstat (limited to 'src/npassd/session.c')
-rw-r--r--src/npassd/session.c13
1 files changed, 5 insertions, 8 deletions
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);
}