On Wed, Sep 07, 2016 at 08:18:02PM +0530, PrasannaKumar Muralidharan wrote: > In core rng_buffer and rng_fillbuf is allocated in hwrng_register only > once and it is freed during module exit. This patch moves allocating > rng_buffer and rng_fillbuf from hwrng_register to rng core's init. This > avoids checking whether rng_buffer and rng_fillbuf was allocated from > every hwrng_register call. Also moving them to module init makes it > explicit that it is freed in module exit. > > Change in v2: > Fix memory leak when register_miscdev fails. > > Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@xxxxxxxxx> Patch applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html