[spice-gtk,v2,23/33] fixup! usb-redir: add files for SCSI and USB MSC implementation

Submitted by Frediano Ziglio on Aug. 9, 2019, 2:26 p.m.

Details

Message ID 20190809142651.2967-24-fziglio@redhat.com
State Superseded
Headers show
Series "CD emulation follow ups" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Aug. 9, 2019, 2:26 p.m.
Clear stream pointer.
As we set loaded to FALSE there's no reason to keep the potential stream.
---
 src/cd-scsi.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/cd-scsi.c b/src/cd-scsi.c
index 62c58942..25842b3b 100644
--- a/src/cd-scsi.c
+++ b/src/cd-scsi.c
@@ -650,6 +650,8 @@  int cd_scsi_dev_unrealize(CdScsiTarget *st, uint32_t lun)
     g_clear_pointer(&dev->version, g_free);
     g_clear_pointer(&dev->serial, g_free);
 
+    g_clear_object(&dev->stream);
+
     dev->loaded = FALSE;
     dev->realized = FALSE;
     dev->power_cond = CD_SCSI_POWER_STOPPED;