提交 315e01ad 编写于 作者: M Markus Elfring 提交者: Paul Moore

selinux: One function call less in genfs_read() after null pointer detection

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NPaul Moore <paul@paul-moore.com>
上级 3a0aa565
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册