diff options
| -rw-r--r-- | security/integrity/evm/evm_secfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/integrity/evm/evm_secfs.c b/security/integrity/evm/evm_secfs.c index fb8bc950aceb..cf5cd303d7c0 100644 --- a/security/integrity/evm/evm_secfs.c +++ b/security/integrity/evm/evm_secfs.c | |||
| @@ -253,8 +253,10 @@ static ssize_t evm_write_xattrs(struct file *file, const char __user *buf, | |||
| 253 | out: | 253 | out: |
| 254 | audit_log_format(ab, " res=%d", err); | 254 | audit_log_format(ab, " res=%d", err); |
| 255 | audit_log_end(ab); | 255 | audit_log_end(ab); |
| 256 | kfree(xattr->name); | 256 | if (xattr) { |
| 257 | kfree(xattr); | 257 | kfree(xattr->name); |
| 258 | kfree(xattr); | ||
| 259 | } | ||
| 258 | return err; | 260 | return err; |
| 259 | } | 261 | } |
| 260 | 262 | ||
