+9
−7
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
This code used to rely on the fact that kfree(NULL) was a no-op, but then we changed smk_parse_smack() to return error pointers on failure instead of NULL. Calling kfree() on an error pointer will oops. I have re-arranged things a bit so that we only free things if they have been allocated. Fixes: e774ad68 ('smack: pass error code through pointers') Signed-off-by:Dan Carpenter <dan.carpenter@oracle.com>