sysv-generator: fix mem leaks
This commit is contained in:
@@ -793,7 +793,7 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
|
|||||||
char **p;
|
char **p;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
_cleanup_closedir_ DIR *d = NULL;
|
_cleanup_closedir_ DIR *d = NULL;
|
||||||
_cleanup_free_ char *path = NULL, *fpath = NULL, *name = NULL;
|
_cleanup_free_ char *path = NULL, *fpath = NULL;
|
||||||
SysvStub *service;
|
SysvStub *service;
|
||||||
Iterator j;
|
Iterator j;
|
||||||
Set *runlevel_services[ELEMENTSOF(rcnd_table)] = {};
|
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))) {
|
while ((de = readdir(d))) {
|
||||||
|
_cleanup_free_ char *name = NULL;
|
||||||
|
|
||||||
int a, b;
|
int a, b;
|
||||||
|
|
||||||
if (hidden_file(de->d_name))
|
if (hidden_file(de->d_name))
|
||||||
@@ -978,5 +980,7 @@ int main(int argc, char *argv[]) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lookup_paths_free(&lp);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user