platform/chrome: cros_ec: Fix possible leak in led_rgb_store()
Function led_rgb_store() contains some direct returns in error cases that leak the already allocated cros_ec_command message structure. Make sure that 'msg' is freed in all exit paths. Detected by Coverity CID 1309666. Signed-off-by: NChristian Engelmayer <cengelma@gmx.at> Signed-off-by: NOlof Johansson <olof@lixom.net>
Showing
想要评论请 注册 或 登录