mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
Be nice and check for nulls
This commit is contained in:
@@ -6,6 +6,11 @@ static void log_path(char *op, struct dentry *dentry, struct vfsmount *mnt)
|
|||||||
{
|
{
|
||||||
char *page, *name;
|
char *page, *name;
|
||||||
|
|
||||||
|
if (!mnt) {
|
||||||
|
printk(KERN_INFO "foobar(%s): %p NULL vfsmnt\n", op, dentry);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
page = (char *)__get_free_page(GFP_KERNEL);
|
page = (char *)__get_free_page(GFP_KERNEL);
|
||||||
if (!page) {
|
if (!page) {
|
||||||
printk(KERN_ERR "foobar(%s): Unable to get page for path %p/%p\n",
|
printk(KERN_ERR "foobar(%s): Unable to get page for path %p/%p\n",
|
||||||
|
Reference in New Issue
Block a user