From: Yu Watanabe Date: Wed, 7 May 2025 19:59:37 +0000 (+0900) Subject: core/unit: use the same hash_ops originally used on allocation X-Git-Tag: v258-rc1~663^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16c7555e1ab9ce5df71f512d8e3973a114abfb7b;p=thirdparty%2Fsystemd.git core/unit: use the same hash_ops originally used on allocation See unit_file_build_name_map(). --- diff --git a/src/core/unit.c b/src/core/unit.c index d057b8ddc9f..c706caae08c 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -4629,7 +4629,7 @@ int unit_write_setting(Unit *u, UnitWriteFlags flags, const char *name, const ch /* Make sure the drop-in dir is registered in our path cache. This way we don't need to stupidly * recreate the cache after every drop-in we write. */ if (u->manager->unit_path_cache) { - r = set_put_strdup(&u->manager->unit_path_cache, p); + r = set_put_strdup_full(&u->manager->unit_path_cache, &path_hash_ops_free, p); if (r < 0) return r; }