[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210512115554.10431-1-penghaob@uniontech.com>
Date: Wed, 12 May 2021 19:55:54 +0800
From: Hao Peng <penghaob@...ontech.com>
To: rodrigosiqueiramelo@...il.com, melissa.srw@...il.com,
hamohammed.sa@...il.com, daniel@...ll.ch, airlied@...ux.ie
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Hao Peng <penghaob@...ontech.com>
Subject: [PATCH] drm:vkms: Add NULL value after free function In function vkms_exit, after kfree(default_config), give specific NULL value to pointer default_config to avoid wild pointer.
Signed-off-by: Hao Peng <penghaob@...ontech.com>
---
drivers/gpu/drm/vkms/vkms_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
index 2173b82606f6..6c63201db5d0 100644
--- a/drivers/gpu/drm/vkms/vkms_drv.c
+++ b/drivers/gpu/drm/vkms/vkms_drv.c
@@ -227,6 +227,7 @@ static void __exit vkms_exit(void)
vkms_destroy(default_config);
kfree(default_config);
+ default_config = NULL;
}
module_init(vkms_init);
--
2.20.1
Powered by blists - more mailing lists