Re: [PATCH]Move kzalloc() just before memset() to avoid initializing new sysfs entries wrongly

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

 



On Fri, 2013-05-10 at 19:10 +0000, Seiji Aguchi wrote:
> > This is manifestly wrong: it would leak memory as it circulates around
> > the loop.
> 
> I don't think the memory leak happens.
> As you can see below, if  a new entry is not created, kfree() is called outside while(1).

Ah, I see, entry is consumed by efivar_create_sysfs_entry(entry)?  In
that case, saying so in the change log would be helpful plus remove the
memset, which is what implied in the old code that the loop didn't
consume entry and which is rendered superfluous by the kzalloc.

James


--
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