[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.7 v4 04/36] qga: free the whole blacklist
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH for-2.7 v4 04/36] qga: free the whole blacklist |
Date: |
Fri, 05 Aug 2016 13:25:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Copying maintainer.
address@hidden writes:
> From: Marc-André Lureau <address@hidden>
>
> Free the config blacklist list, not just the elements. Do it so in the
> more appropriate function config_free().
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> qga/main.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/qga/main.c b/qga/main.c
> index 4c3b2c7..bb48214 100644
> --- a/qga/main.c
> +++ b/qga/main.c
> @@ -1175,6 +1175,7 @@ static void config_free(GAConfig *config)
> #ifdef CONFIG_FSFREEZE
> g_free(config->fsfreeze_hook);
> #endif
> + g_list_free_full(config->blacklist, g_free);
> g_free(config);
> }
>
> @@ -1310,11 +1311,6 @@ static int run_agent(GAState *s, GAConfig *config)
> return EXIT_SUCCESS;
> }
>
> -static void free_blacklist_entry(gpointer entry, gpointer unused)
> -{
> - g_free(entry);
> -}
> -
> int main(int argc, char **argv)
> {
> int ret = EXIT_SUCCESS;
> @@ -1379,7 +1375,6 @@ end:
> if (s->channel) {
> 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);
- [Qemu-devel] [PATCH for-2.7 v4 00/36] Various memory leak fixes, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 01/36] build-sys: fix building with make CFLAGS=.. argument, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 02/36] tests: fix test-qga leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 03/36] glib-compat: add g_(s)list_free_full(), marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 04/36] qga: free the whole blacklist, marcandre . lureau, 2016/08/05
- Re: [Qemu-devel] [PATCH for-2.7 v4 04/36] qga: free the whole blacklist,
Markus Armbruster <=
- [Qemu-devel] [PATCH for-2.7 v4 05/36] qga: free remaining leaking state, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 06/36] tests: fix test-cutils leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 07/36] tests: fix test-vmstate leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 08/36] tests: fix test-iov leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 09/36] tests: fix check-qom-interface leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 10/36] tests: fix check-qom-proplist leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 11/36] tests: fix small leak in test-io-channel-command, marcandre . lureau, 2016/08/05