Skip to content

Commit

Permalink
qga: free a bit more
Browse files Browse the repository at this point in the history
Now that main() has a single exit point, we can free a few
more allocations.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
elmarco authored and mdroth committed Sep 1, 2015
1 parent e3d3103 commit d4c8a5d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qga/main.c
Expand Up @@ -82,15 +82,15 @@ 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;
} deferred_options;
#ifdef CONFIG_FSFREEZE
const char *fsfreeze_hook;
#endif
const gchar *pstate_filepath;
gchar *pstate_filepath;
GAPersistentState pstate;
};

Expand Down Expand Up @@ -1254,6 +1254,8 @@ int main(int argc, char **argv)
ga_channel_free(s->channel);
}
g_list_foreach(config->blacklist, free_blacklist_entry, NULL);
g_free(s->pstate_filepath);
g_free(s->state_filepath_isfrozen);

if (config->daemonize) {
unlink(config->pid_filepath);
Expand Down

0 comments on commit d4c8a5d

Please sign in to comment.