summaryrefslogtreecommitdiffstats
path: root/src/sysv-generator/sysv-generator.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-04-11 13:45:46 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-04-11 13:47:56 +0200
commit7a03974a6f4510dcb1850515a80c2063c767a80f (patch)
treea28072198e6412059313f10c8f4b4b79d8d4c05f /src/sysv-generator/sysv-generator.c
parentbus: implement bus_path_{en,de}code_unique() (diff)
downloadsystemd-7a03974a6f4510dcb1850515a80c2063c767a80f.tar.xz
systemd-7a03974a6f4510dcb1850515a80c2063c767a80f.zip
sysv-generator: fix mem leaks
Diffstat (limited to '')
-rw-r--r--src/sysv-generator/sysv-generator.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 4beea4dd02..e5141c7430 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -793,7 +793,7 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
char **p;
unsigned i;
_cleanup_closedir_ DIR *d = NULL;
- _cleanup_free_ char *path = NULL, *fpath = NULL, *name = NULL;
+ _cleanup_free_ char *path = NULL, *fpath = NULL;
SysvStub *service;
Iterator j;
Set *runlevel_services[ELEMENTSOF(rcnd_table)] = {};
@@ -821,6 +821,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
}
while ((de = readdir(d))) {
+ _cleanup_free_ char *name = NULL;
+
int a, b;
if (hidden_file(de->d_name))
@@ -978,5 +980,7 @@ int main(int argc, char *argv[]) {
continue;
}
+ lookup_paths_free(&lp);
+
return EXIT_SUCCESS;
}