qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 09/12] qga: free a bit more


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH v3 09/12] qga: free a bit more
Date: Wed, 26 Aug 2015 21:35:38 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 08/26/2015 01:05 PM, address@hidden wrote:
From: Marc-André Lureau <address@hidden>

Now that main() has a single exit point, we can free a few
more allocations.

Signed-off-by: Marc-André Lureau <address@hidden>
---
  qga/main.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/qga/main.c b/qga/main.c
index 118847c..58f2fc7 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;
  };
@@ -1253,6 +1253,8 @@ end:
      if (s->channel) {
          ga_channel_free(s->channel);
      }
+    g_free(s->pstate_filepath);
+    g_free(s->state_filepath_isfrozen);
if (config->daemonize) {
          unlink(config->pid_filepath);
Reviewed-by: Denis V. Lunev <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]