ANDROID: dm-user: Drop additional reference
kref_init already takes one reference during initialization. Additional reference will cause memory leak when dm-user target is destroyed. Bug: 188362111 Test: OTA - verify ref count dropping to 0 Signed-off-by: Akilesh Kailash <akailash@google.com> Change-Id: I0b25135371daefdaf2841e9ff5cdfd6aaa389f3b
This commit is contained in:
@ -916,7 +916,6 @@ static int user_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
|||||||
* channels have been closed.
|
* channels have been closed.
|
||||||
*/
|
*/
|
||||||
kref_init(&t->references);
|
kref_init(&t->references);
|
||||||
kref_get(&t->references);
|
|
||||||
|
|
||||||
mutex_init(&t->lock);
|
mutex_init(&t->lock);
|
||||||
init_waitqueue_head(&t->wq);
|
init_waitqueue_head(&t->wq);
|
||||||
|
|||||||
Reference in New Issue
Block a user