git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
KEYS: trusted: Fix missing null return from kzalloc call
[sfrench/cifs-2.6.git]
/
security
/
keys
/
trusted-keys
/
trusted_core.c
diff --git
a/security/keys/trusted-keys/trusted_core.c
b/security/keys/trusted-keys/trusted_core.c
index ec3a066a4b42040cb28e73e43ccb0312c4d89c00..90774793f0b1168e4e8ee7b9903344322ad8fdde 100644
(file)
--- a/
security/keys/trusted-keys/trusted_core.c
+++ b/
security/keys/trusted-keys/trusted_core.c
@@
-116,11
+116,13
@@
static struct trusted_key_payload *trusted_payload_alloc(struct key *key)
ret = key_payload_reserve(key, sizeof(*p));
if (ret < 0)
-
return p
;
+
goto err
;
p = kzalloc(sizeof(*p), GFP_KERNEL);
+ if (!p)
+ goto err;
p->migratable = migratable;
-
+err:
return p;
}