Skip to content
Commit 54302094 authored by Dan Carpenter's avatar Dan Carpenter Committed by Casey Schaufler
Browse files

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: e774ad68

 ('smack: pass error code through pointers')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
parent c0d77c88
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