summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 959de04810..b22019d7b5 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -178,11 +178,9 @@ static int mark_symlink_for_removal(
path_kill_slashes(n);
- r = set_put(*remove_symlinks_to, n);
- if (r < 0) {
- free(n);
+ r = set_consume(*remove_symlinks_to, n);
+ if (r < 0)
return r == -EEXIST ? 0 : r;
- }
return 0;
}