From a6db316372a9d4c4c8c6d7cd1841b3b5630b4428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 20 Nov 2018 15:52:40 +0100 Subject: [PATCH] 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. --- src/shared/main-func.h | 2 ++ 1 file changed, 2 insertions(+) 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 #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; \ }