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:
Akilesh Kailash
2021-05-18 23:08:19 +00:00
parent c83a7134e3
commit cbf0a404e6

View File

@@ -916,7 +916,6 @@ static int user_ctr(struct dm_target *ti, unsigned int argc, char **argv)
* channels have been closed.
*/
kref_init(&t->references);
kref_get(&t->references);
mutex_init(&t->lock);
init_waitqueue_head(&t->wq);