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

Skip to content
Commit c0777d22 authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman
Browse files

staging: altera-stapl: Fix memory leak of altera_init()



In case kzalloc() fails the second or third time
we should free the previous allocated resources.
In order to keep one return point and to keep the cleanup code to one
place, some reordering was necessary.

Also while at it, removed the *sizeof(char) - to quote Linus:
"" Also removed the silly "* sizeof(u8)".  If that isn't 1, we have way
   deeper problems than a simple multiplication can fix. """

Reported-by: default avatarAndre Bartke <andre.bartke@gmail.com>
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8ded351a
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