From 5e6b25b4a7cf2709993f0d67e5ecf965a4a6d9ad Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 28 Jul 2023 06:37:37 +0000 Subject: [PATCH] drm/client: Fix memory leak in drm_client_modeset_probe From Jocelyn Falempe 917bef37cfaca07781c6fbaf6cd9404d27e64e6f in linux-6.1.y/6.1.42 2329cc7a101af1a844fbf706c0724c0baea38365 in mainline linux --- sys/dev/pci/drm/drm_client_modeset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/drm/drm_client_modeset.c b/sys/dev/pci/drm/drm_client_modeset.c index cd658752a40..b06459d7794 100644 --- a/sys/dev/pci/drm/drm_client_modeset.c +++ b/sys/dev/pci/drm/drm_client_modeset.c @@ -881,6 +881,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, break; } + kfree(modeset->mode); modeset->mode = drm_mode_duplicate(dev, mode); drm_connector_get(connector); modeset->connectors[modeset->num_connectors++] = connector; -- 2.20.1