summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-01-19 20:24:06 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2018-01-19 20:24:06 +0000
commit7e9fe3cdf56710233c17404a2cb7479d7a8fb156 (patch)
tree32073e737fdb9c4e9f1025b4740c369e9d515743 /endless
parent26009076a23062f2556b785aa5e5502fa5b52dce (diff)
Do not clean up the profile state before writing data
We use the fields in the profile state singleton.
Diffstat (limited to 'endless')
-rw-r--r--endless/eosprofile.c10
1 files 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);
}