habanalabs: Fix memory leak in error flow of context initialization
authorTomer Tayar <ttayar@habana.ai>
Thu, 23 Jul 2020 06:17:57 +0000 (09:17 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Fri, 24 Jul 2020 17:40:06 +0000 (20:40 +0300)
commit94f8be9eb065412cf069efd45053d33e8911fa9e
tree2b88c58c6b58310d8520be8c678400ce12b11a72
parent644883ef1aa53af1efecf3f84df9951c448b876b
habanalabs: Fix memory leak in error flow of context initialization

Add a missing free of the cs_pending array in the error flow of context
initialization.

Fixes: c16d45f42b64 ("habanalabs: Use pending CS amount per ASIC")

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/context.c