summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-20 15:52:40 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-20 18:40:02 +0100
commita6db316372a9d4c4c8c6d7cd1841b3b5630b4428 (patch)
treeed64dafb6641ec8f9c3bf61230031c7090799b7c /src
parentSplit out pretty-print.c and move pager.c and main-func.h to shared/ (diff)
downloadsystemd-a6db316372a9d4c4c8c6d7cd1841b3b5630b4428.tar.xz
systemd-a6db316372a9d4c4c8c6d7cd1841b3b5630b4428.zip
shared/main-func: also close the polkit agent automatically
The agent is closed after the static destuctors but before the pager. No users of DEFINE_MAIN_FUNCTION* were using a polkit agent, so this makes no functional difference.
Diffstat (limited to 'src')
-rw-r--r--src/shared/main-func.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/main-func.h b/src/shared/main-func.h
index 24bf6c99bf..d8fd89df3c 100644
--- a/src/shared/main-func.h
+++ b/src/shared/main-func.h
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include "pager.h"
+#include "spawn-polkit-agent.h"
#include "static-destruct.h"
#define _DEFINE_MAIN_FUNCTION(impl, ret) \
@@ -11,6 +12,7 @@
int r; \
r = impl(argc, argv); \
static_destruct(); \
+ polkit_agent_close(); \
pager_close(); \
return ret; \
}