X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Finstall.c;h=edf4d2a9fe979b8dbc4c7e09e05938a6655dea20;hb=e4ee6e5cc3e8e23e1ecc0d9fa756d9cc2534d218;hp=959de048103361bd5caa579f542202d58c82abc1;hpb=7fd1b19bc9e9f5574f2877936b8ac267c7706947;p=elogind.git diff --git a/src/shared/install.c b/src/shared/install.c index 959de0481..edf4d2a9f 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; } @@ -1017,7 +1015,7 @@ static int unit_file_load( } r = config_parse(NULL, path, f, NULL, - config_item_table_lookup, (void*) items, true, info); + config_item_table_lookup, (void*) items, true, true, info); if (r < 0) return r;