projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a0aa56
)
selinux: One function call less in genfs_read() after null pointer detection
author
Markus Elfring
<elfring@users.sourceforge.net>
Sat, 14 Jan 2017 16:43:47 +0000
(17:43 +0100)
committer
Paul Moore
<paul@paul-moore.com>
Thu, 23 Mar 2017 21:53:29 +0000
(17:53 -0400)
Call the function "kfree" at the end only after it was determined
that the local variable "newgenfs" contained a non-null pointer.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/policydb.c
patch
|
blob
|
history
diff --git
a/security/selinux/ss/policydb.c
b/security/selinux/ss/policydb.c
index 375e304070e1597d97ac2680d24e56741da30402..4390558464c553196059e35d243022b3b381fa62 100644
(file)
--- a/
security/selinux/ss/policydb.c
+++ b/
security/selinux/ss/policydb.c
@@
-2098,9
+2098,10
@@
static int genfs_read(struct policydb *p, void *fp)
}
rc = 0;
out:
- if (newgenfs)
+ if (newgenfs)
{
kfree(newgenfs->fstype);
- kfree(newgenfs);
+ kfree(newgenfs);
+ }
ocontext_destroy(newc, OCON_FSUSE);
return rc;