Skip to content
Commit 573d09df authored by Yuan Can's avatar Yuan Can Committed by Liwei Song
Browse files

ice: Fix potential memory leak in ice_gnss_tty_write()

commit f5898562 upstream.

The ice_gnss_tty_write() return directly if the write_buf alloc failed,
leaking the cmd_buf.

Fix by free cmd_buf if write_buf alloc failed.

Fixes: d6b98c8d

 ("ice: add write functionality for GNSS TTY")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarLiwei Song <liwei.song@windriver.com>
parent 8ed65d56
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment