diff options
Diffstat (limited to 'security/smack')
-rw-r--r-- | security/smack/smack_lsm.c | 5 | ||||
-rw-r--r-- | security/smack/smackfs.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 87d75417ea93..6e2dc0bab70d 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -2179,7 +2179,10 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
2179 | * This is the simplist possible security model | 2179 | * This is the simplist possible security model |
2180 | * for networking. | 2180 | * for networking. |
2181 | */ | 2181 | */ |
2182 | return smk_access(smack, ssp->smk_in, MAY_WRITE); | 2182 | rc = smk_access(smack, ssp->smk_in, MAY_WRITE); |
2183 | if (rc != 0) | ||
2184 | netlbl_skbuff_err(skb, rc, 0); | ||
2185 | return rc; | ||
2183 | } | 2186 | } |
2184 | 2187 | ||
2185 | /** | 2188 | /** |
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index e7c642458ec9..c21d8c8bf0c7 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -354,9 +354,11 @@ static void smk_cipso_doi(void) | |||
354 | doip->tags[rc] = CIPSO_V4_TAG_INVALID; | 354 | doip->tags[rc] = CIPSO_V4_TAG_INVALID; |
355 | 355 | ||
356 | rc = netlbl_cfg_cipsov4_add_map(doip, NULL, &audit_info); | 356 | rc = netlbl_cfg_cipsov4_add_map(doip, NULL, &audit_info); |
357 | if (rc != 0) | 357 | if (rc != 0) { |
358 | printk(KERN_WARNING "%s:%d add rc = %d\n", | 358 | printk(KERN_WARNING "%s:%d add rc = %d\n", |
359 | __func__, __LINE__, rc); | 359 | __func__, __LINE__, rc); |
360 | kfree(doip); | ||
361 | } | ||
360 | } | 362 | } |
361 | 363 | ||
362 | /** | 364 | /** |