summaryrefslogtreecommitdiff
path: root/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src')
-rw-r--r--lib/src/delsvc.c1
-rw-r--r--lib/src/rdsvc.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/src/delsvc.c b/lib/src/delsvc.c
index fd10cfe..9ab51f1 100644
--- a/lib/src/delsvc.c
+++ b/lib/src/delsvc.c
@@ -35,6 +35,7 @@ void delsvc(service_t *svc)
free(svc->before);
free(svc->after);
+ free(svc->fname);
free(svc->desc);
free(svc->exec);
free(svc->ctty);
diff --git a/lib/src/rdsvc.c b/lib/src/rdsvc.c
index 1f859b7..ef3465f 100644
--- a/lib/src/rdsvc.c
+++ b/lib/src/rdsvc.c
@@ -289,6 +289,10 @@ service_t *rdsvc(int dirfd, const char *filename)
if (svc == NULL)
goto fail_oom;
+ svc->fname = strdup(filename);
+ if (svc->fname == NULL)
+ goto fail_oom;
+
memcpy(svc->name, filename, nlen);
while ((ret = rdline(&rd)) == 0) {