mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
dcc: remove possible dandling pointers
Set pointers to NULL after releasing encoders. This to make sure no further access will occurs. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
parent
fcb57e686a
commit
ca41ff2be0
@ -409,12 +409,17 @@ void dcc_encoders_init(DisplayChannelClient *dcc)
|
||||
void dcc_encoders_free(DisplayChannelClient *dcc)
|
||||
{
|
||||
quic_destroy(dcc->quic);
|
||||
dcc->quic = NULL;
|
||||
lz_destroy(dcc->lz);
|
||||
dcc->lz = NULL;
|
||||
jpeg_encoder_destroy(dcc->jpeg);
|
||||
dcc->jpeg = NULL;
|
||||
#ifdef USE_LZ4
|
||||
lz4_encoder_destroy(dcc->lz4);
|
||||
dcc->lz4 = NULL;
|
||||
#endif
|
||||
zlib_encoder_destroy(dcc->zlib);
|
||||
dcc->zlib = NULL;
|
||||
}
|
||||
|
||||
static void marshaller_compress_buf_free(uint8_t *data, void *opaque)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user