From: jsg Date: Fri, 28 Jul 2023 06:37:37 +0000 (+0000) Subject: drm/client: Fix memory leak in drm_client_modeset_probe X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5e6b25b4a7cf2709993f0d67e5ecf965a4a6d9ad;p=openbsd 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 --- 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;