diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-02-26 06:33:09 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-02-26 06:36:08 +0800 |
commit | c10031f0675a3bb353cfe9a8bc244aed08194eb8 (patch) | |
tree | 7c7b15b097ed2db42372490fd99ffe2964088afb | |
parent | 8d6e1c903efbd4b2cb7bf9a07a1f565955343f33 (diff) | |
download | gsoc2013-evolution-c10031f0675a3bb353cfe9a8bc244aed08194eb8.tar.gz gsoc2013-evolution-c10031f0675a3bb353cfe9a8bc244aed08194eb8.tar.zst gsoc2013-evolution-c10031f0675a3bb353cfe9a8bc244aed08194eb8.zip |
evolution-addressbook-export: Flush event sources before exiting.
Flush any undispated event sources from the default main loop context.
Since this program does not use a main loop, these event sources would
otherwise leak.
-rw-r--r-- | addressbook/tools/evolution-addressbook-export.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addressbook/tools/evolution-addressbook-export.c b/addressbook/tools/evolution-addressbook-export.c index 685fab27f7..523d6bd927 100644 --- a/addressbook/tools/evolution-addressbook-export.c +++ b/addressbook/tools/evolution-addressbook-export.c @@ -182,6 +182,12 @@ main (gint argc, exit (-1); } + /* Flush any undispatched event sources from the default main + * loop context. Since this program does not use a main loop, + * these scheduled event sources would otherwise leak. */ + while (g_main_context_pending (NULL)) + g_main_context_iteration (NULL, FALSE); + g_object_unref (actctx.registry); /*FIXME:should free actctx's some gchar * field, such as output_file! but since the program will end, so that will not cause mem leak. */ |