video: driver: free children and firmware list memory

To avoid memory leakage, clean children and firmware lists
at session close, error cases, and at the end of each usage.

Change-Id: I1eadbf81da207bd987c50428c0c7cf4967a8885f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
This commit is contained in:
Akshata Sahukar
2021-04-30 17:08:09 -07:00
parent 401b0010e7
commit ce09f77e44
5 changed files with 41 additions and 5 deletions

View File

@@ -757,6 +757,9 @@ int msm_v4l2_op_s_ctrl(struct v4l2_ctrl *ctrl)
}
exit:
if (rc)
msm_vidc_free_capabililty_list(inst, CHILD_LIST | FW_LIST);
return rc;
}
@@ -1817,6 +1820,9 @@ int msm_vidc_adjust_v4l2_properties(struct msm_vidc_inst *inst)
}
exit:
if (rc)
msm_vidc_free_capabililty_list(inst, CHILD_LIST | FW_LIST);
return rc;
}
@@ -2742,6 +2748,8 @@ int msm_vidc_set_v4l2_properties(struct msm_vidc_inst *inst)
}
exit:
msm_vidc_free_capabililty_list(inst, FW_LIST);
return rc;
}