Re: [PATCH 134/141] staging: unisys: Hide vbus_hdr_info from public visor_device

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

 



On Tue, May 05, 2015 at 06:37:51PM -0400, Benjamin Romer wrote:
> From: Don Zickus <dzickus@xxxxxxxxxx>
> @@ -1230,8 +1231,16 @@ create_bus_instance(struct visor_device *vdev)
>  {
>  	int rc;
>  	u32 id = vdev->chipset_bus_no;
> +	struct spar_vbus_headerinfo *hdr_info;
>  
>  	POSTCODE_LINUX_2(BUS_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
> +
> +	hdr_info = kzalloc(sizeof(struct spar_vbus_headerinfo), GFP_KERNEL);
> +	if (!hdr_info) {
> +		rc = -ENOMEM;
> +		goto away;
> +	}
> +	vdev->vbus_hdr_info = (void *)hdr_info;
>  	dev_set_name(&vdev->device, "visorbus%d", id);
>  	vdev->device.bus = &visorbus_type;
>  	vdev->device.groups = visorbus_groups;

This function leaks hdr_info on later error paths.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux