Re: [PATCH] block: Fix reference count leak in blk_integrity_add

2020-07-25 Thread Markus Elfring
> kobject_init_and_add() takes reference even when it fails. If this > function returns an error, kobject_put() must be called to properly > clean up the memory associated with the object. * An imperative wording can be preferred for the change description, can't it? * Would you like to add

[PATCH] block: Fix reference count leak in blk_integrity_add

2020-07-24 Thread Yi Wang
From: Liao Pingfang kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- block/blk-integrity.c | 4 +++- 1