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: NDan Carpenter <dan.carpenter@oracle.com>
Showing
想要评论请 注册 或 登录