diff options
Diffstat (limited to 'security/selinux/xfrm.c')
-rw-r--r-- | security/selinux/xfrm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index 3b8b994faad4..8f17f542a116 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c | |||
@@ -180,8 +180,7 @@ int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall) | |||
180 | 180 | ||
181 | if (!ckall) | 181 | if (!ckall) |
182 | break; | 182 | break; |
183 | } | 183 | } else if (*sid != ctx->ctx_sid) |
184 | else if (*sid != ctx->ctx_sid) | ||
185 | return -EINVAL; | 184 | return -EINVAL; |
186 | } | 185 | } |
187 | } | 186 | } |
@@ -326,8 +325,7 @@ int selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, | |||
326 | */ | 325 | */ |
327 | void selinux_xfrm_policy_free(struct xfrm_sec_ctx *ctx) | 326 | void selinux_xfrm_policy_free(struct xfrm_sec_ctx *ctx) |
328 | { | 327 | { |
329 | if (ctx) | 328 | kfree(ctx); |
330 | kfree(ctx); | ||
331 | } | 329 | } |
332 | 330 | ||
333 | /* | 331 | /* |
@@ -372,8 +370,7 @@ int selinux_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *uct | |||
372 | void selinux_xfrm_state_free(struct xfrm_state *x) | 370 | void selinux_xfrm_state_free(struct xfrm_state *x) |
373 | { | 371 | { |
374 | struct xfrm_sec_ctx *ctx = x->security; | 372 | struct xfrm_sec_ctx *ctx = x->security; |
375 | if (ctx) | 373 | kfree(ctx); |
376 | kfree(ctx); | ||
377 | } | 374 | } |
378 | 375 | ||
379 | /* | 376 | /* |