red_replay_image_free: do not free QUIC qxl twice

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@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
Uri Lublin 2017-06-06 15:00:11 +03:00
parent fbbcdad773
commit 94725f1ca8

View File

@ -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();