accel/habanalabs: fix mem leak in capture user mappings
authorMoti Haimovski <mhaimovski@habana.ai>
Sun, 16 Apr 2023 15:36:17 +0000 (18:36 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 8 Jun 2023 09:35:55 +0000 (12:35 +0300)
commit314a7ffd7c196b27eedd50cb7553029e17789b55
tree711ba03ea4e69ae707bae7d8bb54d864f0335840
parente715008b7c318fb1901a37bdd0941fb46c2b90b5
accel/habanalabs: fix mem leak in capture user mappings

This commit fixes a memory leak caused when clearing the user_mappings
info when a new context is opened immediately after user_mapping is
captured and a hard reset is performed.

Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/habanalabs_drv.c