commit | 5430209497eeb01415c681aaac0d00f65d24a526 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Thu Jun 11 11:51:16 2015 +0300 |
committer | Casey Schaufler <casey@schaufler-ca.com> | Fri Jun 12 11:59:11 2015 -0700 |
tree | 88bb712ff5231e78e43f9d7a4c63f2bf2d1f8be2 | |
parent | c0d77c884461fc0dec0411e49797dc3f3651c31b [diff] |
Smack: freeing an error pointer in smk_write_revoke_subj() 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: e774ad683f42 ('smack: pass error code through pointers') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>