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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-11-20 15:52:40 +01:00
parent 294bf0c34a
commit a6db316372
1 changed files with 2 additions and 0 deletions

View File

@ -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; \
}