aboutsummaryrefslogtreecommitdiff
path: root/Documentation/driver-api/fpga/fpga-programming.rst
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2019-08-01 13:57:36 +0000
committerOded Gabbay <oded.gabbay@gmail.com>2019-08-12 09:00:34 +0300
commit508c5849c62d009e03f37ad0f556071fac5112f0 (patch)
treecf830b1f50c6ace76ea924efd2e4b02fd48870eb /Documentation/driver-api/fpga/fpga-programming.rst
parentd45331b00ddb179e291766617259261c112db872 (diff)
habanalabs: Avoid double free in error flow
In case kernel context init fails during device initialization, both hl_ctx_put() and kfree() are called, ending with a double free of the kernel context. Calling kfree() is needed only when a failure happens between the allocation of the kernel context and its initialization, so move it to there and remove it from the error flow. 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>
Diffstat (limited to 'Documentation/driver-api/fpga/fpga-programming.rst')
0 files changed, 0 insertions, 0 deletions