[libvirt] [PATCH] Fix a memory leak in the node_device_udev code

Eric Blake eblake at redhat.com
Wed Apr 28 21:06:29 UTC 2010

On 04/28/2010 02:27 PM, Chris Lalancette wrote:
> We were over-writing a pointer without freeing it in
> case of a disk device, leading to a memory leak.
> Signed-off-by: Chris Lalancette <clalance at redhat.com>
> ---
>  src/node_device/node_device_udev.c |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)

Plugging a memory leak by pure code deletion - nice :)

I had to double-check, but concur that udevProcessDisk is static, and
the only caller already had data->storage.drive_type set to "disk" on
entry.  ACK.

> -    data->storage.drive_type = strdup("disk");

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100428/92431a37/attachment-0001.sig>

More information about the libvir-list mailing list