[Spice-devel] [PATCH spice-server] test-listen: Fix some use after free

Victor Toso victortoso at redhat.com
Tue Mar 13 13:32:28 UTC 2018


Hi,

On Tue, Mar 13, 2018 at 01:14:35PM +0000, Frediano Ziglio wrote:
> Do not dereference thread_data after has been freed.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

Sure,
Acked-by: Victor Toso <victortoso at redhat.com>

> ---
>  server/tests/test-listen.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/tests/test-listen.c b/server/tests/test-listen.c
> index 531bd1bd..c63ee17e 100644
> --- a/server/tests/test-listen.c
> +++ b/server/tests/test-listen.c
> @@ -174,9 +174,9 @@ static gpointer check_magic_thread(gpointer data)
>  
>      g_object_unref(stream);
>      g_object_unref(connectable);
> -    g_free(thread_data);
>  
>      test_event_loop_quit(thread_data->event_loop);
> +    g_free(thread_data);
>  
>      return NULL;
>  }
> @@ -194,9 +194,9 @@ static gpointer check_no_connect_thread(gpointer data)
>      g_clear_error(&error);
>  
>      g_object_unref(connectable);
> -    g_free(thread_data);
>  
>      test_event_loop_quit(thread_data->event_loop);
> +    g_free(thread_data);
>  
>      return NULL;
>  }
> -- 
> 2.14.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180313/ac99e796/attachment-0001.sig>


More information about the Spice-devel mailing list