[Spice-devel] [spice-server PATCH 2/3] red_replay_image_free: do not free QUIC qxl twice
Pavel Grunt
pgrunt at redhat.com
Mon Jul 17 07:09:53 UTC 2017
On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote:
> If qxl->descriptor.type is QUIC, red_replay_data_chunks_free
> frees qxl (data), so no need to free it again at the bottom
> of the function.
>
> Found by coverity.
>
> Signed-off-by: Uri Lublin <uril at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
> server/red-replay-qxl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
> index 3c0f528bd..6172ed22e 100644
> --- a/server/red-replay-qxl.c
> +++ b/server/red-replay-qxl.c
> @@ -523,6 +523,7 @@ static void red_replay_image_free(SpiceReplay *replay,
> QXLPHYSICAL p, uint32_t f
> break;
> case SPICE_IMAGE_TYPE_QUIC:
> red_replay_data_chunks_free(replay, qxl, 0);
> + qxl = NULL;
> break;
> default:
> spice_warn_if_reached();
More information about the Spice-devel
mailing list