[libvirt] Memory leak in node_device_conf.c

Daniel P. Berrange berrange at redhat.com
Thu Jun 25 09:31:38 UTC 2009


On Tue, Jun 23, 2009 at 04:08:53PM -0400, Dave Allan wrote:
> I found what I assume is a memory leak in the node device code while 
> working on a separate problem; patch attached.
> 
> Dave

> diff --git a/src/node_device_conf.c b/src/node_device_conf.c
> index 1fbf9dc..56a9bb5 100644
> --- a/src/node_device_conf.c
> +++ b/src/node_device_conf.c
> @@ -1203,6 +1203,8 @@ void virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps)
>          VIR_FREE(data->net.address);
>          break;
>      case VIR_NODE_DEV_CAP_SCSI_HOST:
> +        VIR_FREE(data->scsi_host.wwnn);
> +        VIR_FREE(data->scsi_host.wwpn);
>          break;
>      case VIR_NODE_DEV_CAP_SCSI:
>          VIR_FREE(data->scsi.type);


ACK


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list