diff --git a/src/main.c b/src/main.c
index ccb5fa5..bc53a8e 100644
--- a/src/main.c
+++ b/src/main.c
static gboolean option_version = FALSE;
static gboolean option_udev = FALSE;
+static void free_options(void)
+{
+ g_free(option_debug);
+ option_debug = NULL;
+
+ g_free(option_plugin);
+ option_plugin = NULL;
+
+ g_free(option_noplugin);
+ option_noplugin = NULL;
+}
+
static guint last_adapter_timeout = 0;
static gboolean exit_timeout(gpointer data)
* daemon needs to be re-worked. */
plugin_init(config, option_plugin, option_noplugin);
+ /* no need to keep parsed option in memory */
+ free_options();
+
mgmt_err = mgmt_setup();
if (mgmt_err < 0) {
error("mgmt setup failed: %s", strerror(-mgmt_err));