diff options
author | Nick Schermer <nick@xfce.org> | 2010-02-08 18:44:58 +0100 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2010-02-08 19:54:14 +0100 |
commit | dd39de1f20e168ebc4b101b5010ec2f944d86d3e (patch) | |
tree | 4d08e7a284c9d46d579dd00a3b21792c41934b57 | |
parent | 9009610f6fa185815f6ebd5c00da7cb64f17b41e (diff) | |
download | xfconf-dd39de1f20e168ebc4b101b5010ec2f944d86d3e.tar.gz |
Free backends hash table on exit.
-rw-r--r-- | xfconfd/main.c | 3 | ||||
-rw-r--r-- | xfconfd/xfconf-backend-factory.c | 10 | ||||
-rw-r--r-- | xfconfd/xfconf-backend-factory.h | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/xfconfd/main.c b/xfconfd/main.c index cbdc269..2d8a80f 100644 --- a/xfconfd/main.c +++ b/xfconfd/main.c @@ -50,6 +50,7 @@ #include <libxfce4util/libxfce4util.h> #include "xfconf-daemon.h" +#include "xfconf-backend-factory.h" #define DEFAULT_BACKEND "xfce-perchannel-xml" @@ -231,6 +232,8 @@ main(int argc, g_main_loop_run(mloop); g_object_unref(G_OBJECT(xfconfd)); + + xfconf_backend_factory_cleanup(); if(signal_watch) { g_source_remove(signal_watch); diff --git a/xfconfd/xfconf-backend-factory.c b/xfconfd/xfconf-backend-factory.c index c893b3f..307d7c7 100644 --- a/xfconfd/xfconf-backend-factory.c +++ b/xfconfd/xfconf-backend-factory.c @@ -87,3 +87,13 @@ xfconf_backend_factory_get_backend(const gchar *type, return backend; } + + +void +xfconf_backend_factory_cleanup (void) +{ + if(backends) { + g_hash_table_destroy(backends); + backends = NULL; + } +} diff --git a/xfconfd/xfconf-backend-factory.h b/xfconfd/xfconf-backend-factory.h index 0dde2c9..6b162f1 100644 --- a/xfconfd/xfconf-backend-factory.h +++ b/xfconfd/xfconf-backend-factory.h @@ -29,6 +29,8 @@ G_BEGIN_DECLS XfconfBackend *xfconf_backend_factory_get_backend(const gchar *type, GError **error); +void xfconf_backend_factory_cleanup (void); + G_END_DECLS #endif /* __XFCONF_BACKEND_FACTORY_H__ */ |