Re: [PATCH] drivers/usb/gadget: add missing kfree calls

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

 



On Sat, 04 Jun 2011 23:35:16 +0200
"Michal Nazarewicz" <mina86@xxxxxxxxxx> wrote:

> On Sat, 04 Jun 2011 21:34:54 +0200, Andre Bartke  
> <andre.bartke@xxxxxxxxxxxxxx> wrote:
> > diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
> > @@ -700,6 +701,7 @@ static int rndis_reset_response(int configNr,  
> > rndis_reset_msg_type *buf)
> >  	resp->AddressingReset = cpu_to_le32(1);
> > 	params->resp_avail(params->v);
> > +	kfree(r);
> >  	return 0;
> >  }
> 
> Have you tested this?  It does not look right to me.
> rndis_add_response() allocates memory and puts the request on a
> list.  It is later freed in rndis_free_response().
> 

Nope, the only way I can test this is a build - which it does.
You might be right though.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux