[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 09/12] qga: free a bit more
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v2 09/12] qga: free a bit more |
Date: |
Wed, 26 Aug 2015 00:10:21 +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 v2 01/12] qga: misc spelling, (continued)
- [Qemu-devel] [PATCH v2 02/12] qga: use exit() when parsing options, marcandre . lureau, 2015/08/25
- [Qemu-devel] [PATCH v2 03/12] qga: move string split in separate function, marcandre . lureau, 2015/08/25
- [Qemu-devel] [PATCH v2 05/12] qga: copy argument strings, marcandre . lureau, 2015/08/25
- [Qemu-devel] [PATCH v2 04/12] qga: rename 'path' to 'channel_path', marcandre . lureau, 2015/08/25
- [Qemu-devel] [PATCH v2 06/12] qga: move option parsing to seperate function, marcandre . lureau, 2015/08/25
- [Qemu-devel] [PATCH v2 09/12] qga: free a bit more,
marcandre . lureau <=
- [Qemu-devel] [PATCH v2 07/12] qga: fill default options in main(), marcandre . lureau, 2015/08/25
- [Qemu-devel] [PATCH v2 10/12] qga: add an optionnal qemu-ga.conf system configuration, marcandre . lureau, 2015/08/25
- Re: [Qemu-devel] [PATCH v2 10/12] qga: add an optionnal qemu-ga.conf system configuration, Markus Armbruster, 2015/08/26
- [Qemu-devel] [PATCH v2 08/12] qga: move agent run in a seperate function, marcandre . lureau, 2015/08/25