Skip to content
Commit 0f8983cf authored by Casey Schaufler's avatar Casey Schaufler
Browse files

Smack: Fix memory leak in smack_inode_getsecctx



Fix memory leak in smack_inode_getsecctx

The implementation of smack_inode_getsecctx() made
incorrect assumptions about how Smack presents a security
context. Smack does not need to allocate memory to support
security contexts, so "releasing" a Smack context is a no-op.
The code made an unnecessary copy and returned that as a
context, which was never freed. The revised implementation
returns the context correctly.

Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Reported-by: default avatarCHANDAN VN <chandan.vn@samsung.com>
Tested-by: default avatarCHANDAN VN <chandan.vn@samsung.com>
parent b3859ee1
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