summaryrefslogtreecommitdiff
path: root/lib/src/rdsvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/rdsvc.c')
-rw-r--r--lib/src/rdsvc.c4
1 files changed, 4 insertions, 0 deletions
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) {