On Fri, May 08, 2015 at 11:34:57AM +0300, Dan Carpenter wrote:
> On Tue, May 05, 2015 at 06:37:51PM -0400, Benjamin Romer wrote:
> > From: Don Zickus <dzic...@redhat.com>
> > @@ -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.

Never mind.  I'm wrong.  Sorry for the noise.

regards,
dan carpenter

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to