[libvirt] Memory leak in node_device_conf.c

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);

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 :|

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.
Okay, applied and commited ! thanks :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Dave Allan