Merge pull request #2328 from evverx/fix-transient-units-memeory-leak

Fix transient units memory leak
This commit is contained in:
Daniel Mack
2016-01-15 09:03:34 +01:00
2 changed files with 12 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ int unit_load_dropin(Unit *u) {
}
}
u->dropin_paths = strv_free(u->dropin_paths);
r = unit_find_dropin_paths(u, &u->dropin_paths);
if (r <= 0)
return 0;

View File

@@ -138,6 +138,17 @@ install_valgrind() {
dracut_install $_valgrind_dbg_and_supp
}
create_valgrind_wrapper() {
local _valgrind_wrapper=$initdir/$ROOTLIBDIR/systemd-under-valgrind
ddebug "Create $_valgrind_wrapper"
cat >$_valgrind_wrapper <<EOF
#!/bin/bash
exec valgrind --leak-check=full --log-file=/valgrind.out $ROOTLIBDIR/systemd "\$@"
EOF
chmod 0755 $_valgrind_wrapper
}
install_dmevent() {
instmods dm_crypt =crypto
type -P dmeventd >/dev/null && dracut_install dmeventd