[PATCH spice-gtk 26/44] fixup! usb-redir: add files for SCSI and USB MSC implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove data_buf leak.
---
 src/cd-usb-bulk-msd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/cd-usb-bulk-msd.c b/src/cd-usb-bulk-msd.c
index 843f4f2e..41e210f0 100644
--- a/src/cd-usb-bulk-msd.c
+++ b/src/cd-usb-bulk-msd.c
@@ -129,6 +129,7 @@ UsbCdBulkMsdDevice *cd_usb_bulk_msd_alloc(void *usb_user_data, uint32_t max_luns
 
     cd->scsi_target = cd_scsi_target_alloc(cd, max_luns);
     if (cd->scsi_target == NULL) {
+        g_free(cd->data_buf);
         g_free(cd);
         return NULL;
     }
@@ -238,6 +239,7 @@ int cd_usb_bulk_msd_unrealize(UsbCdBulkMsdDevice *cd, uint32_t lun)
 void cd_usb_bulk_msd_free(UsbCdBulkMsdDevice *cd)
 {
     cd_scsi_target_free(cd->scsi_target);
+    g_free(cd->data_buf);
     g_free(cd);
 
     SPICE_DEBUG("Free");
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]