mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Young Xiao <92siuyang@gmail.com>
To: patrik.r.jakobsson@gmail.com, airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Young Xiao <92siuyang@gmail.com>
Subject: [PATCH] drm/gma500: fix edid memory leak in SDVO
Date: Wed, 29 May 2019 10:02:25 +0800	[thread overview]
Message-ID: <1559095345-25538-1-git-send-email-92siuyang@gmail.com> (raw)

The variable edid returned by psb_intel_sdvo_get_edid()
was never freed.

Signed-off-by: Young Xiao <92siuyang@gmail.com>
---
 drivers/gpu/drm/gma500/psb_intel_sdvo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index dd3cec0..cc5fb85 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -1656,6 +1656,7 @@ static bool psb_intel_sdvo_detect_hdmi_audio(struct drm_connector *connector)
 	edid = psb_intel_sdvo_get_edid(connector);
 	if (edid != NULL && edid->input & DRM_EDID_INPUT_DIGITAL)
 		has_audio = drm_detect_monitor_audio(edid);
+	kfree(edid);
 
 	return has_audio;
 }
-- 
2.7.4


                 reply	other threads:[~2019-05-29  2:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1559095345-25538-1-git-send-email-92siuyang@gmail.com \
    --to=92siuyang@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrik.r.jakobsson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®