Re: [PATCH 2/2] efi/efi_test: drop useless kfree

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

 



On Tue, May 02, 2017 at 03:11:45PM +0800, ivanhu wrote:
> 
> 
> On 04/29/2017 09:42 AM, Geliang Tang wrote:
> > Drop useless kfree when memdup_user() failed, since we have already
> > called kfree in memdup_user().
> > 
> > Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
> > ---
> >   drivers/firmware/efi/test/efi_test.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
> > index 08129b7..00332ae 100644
> > --- a/drivers/firmware/efi/test/efi_test.c
> > +++ b/drivers/firmware/efi/test/efi_test.c
> > @@ -261,10 +261,8 @@ static long efi_runtime_set_variable(unsigned long arg)
> >   	}
> >   	data = memdup_user(setvariable.data, setvariable.data_size);
> > -	if (IS_ERR(data)) {
> > -		kfree(name);
> You mean "name" or "data"?
> 

Sorry, it's my mistake. The original code is correct. Please ignore this
patch.

-Geliang

> Cheers,
> Ivan
> 
> > +	if (IS_ERR(data))
> >   		return PTR_ERR(data);
> > -	}
> >   	status = efi.set_variable(name, &vendor_guid,
> >   				setvariable.attributes,
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux