Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7f8b4ebe authored by Souptick Joarder's avatar Souptick Joarder Committed by Greg Kroah-Hartman
Browse files

serial: ioc4_serial: Free memory when kzalloc fails during probe



Inside ioc4_attach_local() 4 memory was allocated using kzalloc and
assign it to ports[] within loop. When kzalloc fails inside loop,
it returns error without freeing previously allocated memory and we
may have memory leak. Fix this by freeing ports[] before return.

Signed-off-by: default avatarSouptick joarder <jrdr.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 65dabaf5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment