diff mbox

[09/12] qga: free a bit more

Message ID 1435751267-26378-10-git-send-email-marcandre.lureau@gmail.com
State New
Headers show

Commit Message

Marc-André Lureau July 1, 2015, 11:47 a.m. UTC
Now that main() has a single exit point, we can free a few
more allocations.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
---
 qga/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/qga/main.c b/qga/main.c
index aaf0e10..bd87050 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -82,7 +82,7 @@  struct GAState {
     bool delimit_response;
     bool frozen;
     GList *blacklist;
-    const char *state_filepath_isfrozen;
+    char *state_filepath_isfrozen;
     struct {
         const char *log_filepath;
         const char *pid_filepath;
@@ -90,7 +90,7 @@  struct GAState {
 #ifdef CONFIG_FSFREEZE
     const char *fsfreeze_hook;
 #endif
-    const gchar *pstate_filepath;
+    gchar *pstate_filepath;
     GAPersistentState pstate;
 };
 
@@ -1224,6 +1224,8 @@  end:
     if (s->channel) {
         ga_channel_free(s->channel);
     }
+    g_free(s->pstate_filepath);
+    g_free(s->state_filepath_isfrozen);
 
     if (daemonize) {
         unlink(pid_filepath);