qga: free a bit more
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>
This commit is contained in:
parent
e3d3103975
commit
d4c8a5d49e
|
@ -82,7 +82,7 @@ struct GAState {
|
||||||
bool delimit_response;
|
bool delimit_response;
|
||||||
bool frozen;
|
bool frozen;
|
||||||
GList *blacklist;
|
GList *blacklist;
|
||||||
const char *state_filepath_isfrozen;
|
char *state_filepath_isfrozen;
|
||||||
struct {
|
struct {
|
||||||
const char *log_filepath;
|
const char *log_filepath;
|
||||||
const char *pid_filepath;
|
const char *pid_filepath;
|
||||||
|
@ -90,7 +90,7 @@ struct GAState {
|
||||||
#ifdef CONFIG_FSFREEZE
|
#ifdef CONFIG_FSFREEZE
|
||||||
const char *fsfreeze_hook;
|
const char *fsfreeze_hook;
|
||||||
#endif
|
#endif
|
||||||
const gchar *pstate_filepath;
|
gchar *pstate_filepath;
|
||||||
GAPersistentState pstate;
|
GAPersistentState pstate;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1254,6 +1254,8 @@ end:
|
||||||
ga_channel_free(s->channel);
|
ga_channel_free(s->channel);
|
||||||
}
|
}
|
||||||
g_list_foreach(config->blacklist, free_blacklist_entry, NULL);
|
g_list_foreach(config->blacklist, free_blacklist_entry, NULL);
|
||||||
|
g_free(s->pstate_filepath);
|
||||||
|
g_free(s->state_filepath_isfrozen);
|
||||||
|
|
||||||
if (config->daemonize) {
|
if (config->daemonize) {
|
||||||
unlink(config->pid_filepath);
|
unlink(config->pid_filepath);
|
||||||
|
|
Loading…
Reference in New Issue