diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2019-05-29 12:09:20 +0300 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2019-05-29 11:22:32 +0200 |
commit | d5f201345f6d27b6280750e5c6502f4418614fbc (patch) | |
tree | a357572f3a95ded56da75bd61f3d0f8c3fe8437e /plugins | |
parent | 475af64f64cbc210c87588d425fa9a14cd9760b6 (diff) | |
download | rpm-d5f201345f6d27b6280750e5c6502f4418614fbc.tar.gz |
Fully shutdown DBUS on systemd_inhibit cleanup (RhBug:1714657)
dbus_shutdown() frees internal DBUS memory allocations that will otherwise
show up as memory leaks. This is of little consequence in practise
but shuts up valgrind...
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/systemd_inhibit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/systemd_inhibit.c b/plugins/systemd_inhibit.c index e2cbcffbb..0628188ba 100644 --- a/plugins/systemd_inhibit.c +++ b/plugins/systemd_inhibit.c @@ -80,6 +80,11 @@ static rpmRC systemd_inhibit_init(rpmPlugin plugin, rpmts ts) return RPMRC_NOTFOUND; } +static void systemd_inhibit_cleanup(rpmPlugin plugin) +{ + dbus_shutdown(); +} + static rpmRC systemd_inhibit_tsm_pre(rpmPlugin plugin, rpmts ts) { if (rpmtsFlags(ts) & (RPMTRANS_FLAG_TEST|RPMTRANS_FLAG_BUILD_PROBS)) @@ -106,6 +111,7 @@ static rpmRC systemd_inhibit_tsm_post(rpmPlugin plugin, rpmts ts, int res) struct rpmPluginHooks_s systemd_inhibit_hooks = { .init = systemd_inhibit_init, + .cleanup = systemd_inhibit_cleanup, .tsm_pre = systemd_inhibit_tsm_pre, .tsm_post = systemd_inhibit_tsm_post, }; |