Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cw1200: Fix memory leak in cw1200_set_key()
When wsm_key.index > WSM_KEY_MAX_INDEX, cw1200_set_key() returns without calling cw1200_free_key() like other wrong paths, which may lead to a potential memory leak. We can fix it by calling cw1200_free_key() when some error occurs. Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
- Loading branch information