[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 09/12] qga: free a bit more
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v3 09/12] qga: free a bit more |
Date: |
Wed, 26 Aug 2015 12:05:22 +0200 |
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);
--
2.4.3
- Re: [Qemu-devel] [PATCH v3 05/12] qga: copy argument strings, (continued)
[Qemu-devel] [PATCH v3 06/12] qga: move option parsing to separate function, marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v3 07/12] qga: fill default options in main(), marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v3 08/12] qga: move agent run in a separate function, marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v3 09/12] qga: free a bit more,
marcandre . lureau <=
[Qemu-devel] [PATCH v3 10/12] qga: add an optionnal qemu-ga.conf system configuration, marcandre . lureau, 2015/08/26
Re: [Qemu-devel] [PATCH v3 10/12] qga: add an optionnal qemu-ga.conf system configuration, Denis V. Lunev, 2015/08/26
[Qemu-devel] [PATCH v3 11/12] qga: add --dump-conf option, marcandre . lureau, 2015/08/26