chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shared: fix memleak
[elogind.git]
/
src
/
shared
/
install.c
diff --git
a/src/shared/install.c
b/src/shared/install.c
index 1cc999b4d3979c2aad12591850a091b29804d2a8..b121018e9722a4d49296ae6602cff405eb691917 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-514,7
+514,7
@@
static int find_symlinks_in_scope(
UnitFileState *state) {
int r;
UnitFileState *state) {
int r;
- _cleanup_free_ char *path = NULL;
+ _cleanup_free_ char *
normal_path = NULL, *runtime_
path = NULL;
bool same_name_link_runtime = false, same_name_link = false;
assert(scope >= 0);
bool same_name_link_runtime = false, same_name_link = false;
assert(scope >= 0);
@@
-522,11
+522,11
@@
static int find_symlinks_in_scope(
assert(name);
/* First look in runtime config path */
assert(name);
/* First look in runtime config path */
- r = get_config_path(scope, true, root_dir, &path);
+ r = get_config_path(scope, true, root_dir, &
normal_
path);
if (r < 0)
return r;
if (r < 0)
return r;
- r = find_symlinks(name, path, &same_name_link_runtime);
+ r = find_symlinks(name,
normal_
path, &same_name_link_runtime);
if (r < 0)
return r;
else if (r > 0) {
if (r < 0)
return r;
else if (r > 0) {
@@
-535,11
+535,11
@@
static int find_symlinks_in_scope(
}
/* Then look in the normal config path */
}
/* Then look in the normal config path */
- r = get_config_path(scope, false, root_dir, &path);
+ r = get_config_path(scope, false, root_dir, &
runtime_
path);
if (r < 0)
return r;
if (r < 0)
return r;
- r = find_symlinks(name, path, &same_name_link);
+ r = find_symlinks(name,
runtime_
path, &same_name_link);
if (r < 0)
return r;
else if (r > 0) {
if (r < 0)
return r;
else if (r > 0) {