[libvirt] [PATCH] Fix leak in SCSI storage backend

The SCSI storage backend leaks a string containing the pathname for each block device it discovers * src/storage/storage_backend_scsi.c: Free the device name --- src/storage/storage_backend_scsi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index 95ae546..d880d65 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -455,6 +455,7 @@ processLU(virStoragePoolObjPtr pool, VIR_FREE(type_path); out: + VIR_FREE(block_device); return retval; } -- 1.7.3.4

On 01/24/2011 08:35 AM, Daniel P. Berrange wrote:
The SCSI storage backend leaks a string containing the pathname for each block device it discovers
* src/storage/storage_backend_scsi.c: Free the device name --- src/storage/storage_backend_scsi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index 95ae546..d880d65 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -455,6 +455,7 @@ processLU(virStoragePoolObjPtr pool, VIR_FREE(type_path);
out: + VIR_FREE(block_device); return retval; }
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Mon, Jan 24, 2011 at 03:35:12PM +0000, Daniel P. Berrange wrote:
The SCSI storage backend leaks a string containing the pathname for each block device it discovers
* src/storage/storage_backend_scsi.c: Free the device name --- src/storage/storage_backend_scsi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index 95ae546..d880d65 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -455,6 +455,7 @@ processLU(virStoragePoolObjPtr pool, VIR_FREE(type_path);
out: + VIR_FREE(block_device); return retval; }
-- 1.7.3.4
--
ACK Dave
participants (3)
-
Daniel P. Berrange
-
Dave Allan
-
Eric Blake