From 7e9fe3cdf56710233c17404a2cb7479d7a8fb156 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 19 Jan 2018 20:24:06 +0000 Subject: Do not clean up the profile state before writing data We use the fields in the profile state singleton. --- endless/eosprofile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/endless/eosprofile.c b/endless/eosprofile.c index 5238ef7..732da79 100644 --- a/endless/eosprofile.c +++ b/endless/eosprofile.c @@ -630,11 +630,6 @@ eos_profile_state_dump (void) gvdb_item_set_value (item, g_variant_builder_end (&builder)); } - /* Clean up */ - g_hash_table_unref (profile_state->probes); - g_free (profile_state->capture_file); - g_free (profile_state); - g_autoptr(GError) error = NULL; gvdb_table_write_contents (db_table, profile_state->capture_file, G_BYTE_ORDER != G_LITTLE_ENDIAN, @@ -642,4 +637,9 @@ eos_profile_state_dump (void) if (error != NULL) g_printerr ("PROFILE: %s\n", error->message); + + /* Clean up */ + g_hash_table_unref (profile_state->probes); + g_free (profile_state->capture_file); + g_free (profile_state); } -- cgit v1.2.3