summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_display.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-04-16 13:36:00 +1000
committerDave Airlie <airlied@redhat.com>2013-04-16 13:36:00 +1000
commit62c8ba7c58e4163f975c5f8b5a3dd5f306a2deda (patch)
tree0172a68cb13daa74b4c7003946c44d19076b54ee /drivers/gpu/drm/qxl/qxl_display.c
parent6d01f1f54c01877baad11389291c1aeab9c11e0f (diff)
drm/qxl: fix smatch warnings
drivers/gpu/drm/qxl/qxl_display.c:99 qxl_alloc_client_monitors_config() error: dereferencing freed memory 'qdev->client_monitors_config' drivers/gpu/drm/qxl/qxl_object.c:66 qxl_ttm_placement_from_domain() warn: bitwise AND condition is false here drivers/gpu/drm/qxl/qxl_ioctl.c:353 qxl_clientcap_ioctl() warn: buffer overflow 'qdev->rom->client_capabilities' 58 <= 58 Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_display.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 567a5328cfc4..fcfd4436ceed 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -84,6 +84,7 @@ void qxl_alloc_client_monitors_config(struct qxl_device *qdev, unsigned count)
if (qdev->client_monitors_config &&
count > qdev->client_monitors_config->count) {
kfree(qdev->client_monitors_config);
+ qdev->client_monitors_config = NULL;
}
if (!qdev->client_monitors_config) {
qdev->client_monitors_config = kzalloc(