Received: by 10.192.165.148 with SMTP id m20csp605667imm; Fri, 20 Apr 2018 12:03:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx499T+z0ExmFg0U6e8pckfv6hrxAFsP+q+noRpMriYktfVsBs0wUQbG5pZ0soNVu74PSA2YE X-Received: by 2002:a17:902:5a88:: with SMTP id r8-v6mr11469001pli.78.1524251017780; Fri, 20 Apr 2018 12:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524251017; cv=none; d=google.com; s=arc-20160816; b=kPZbYALoZ+m0GI3UkakD1xcsDgvS+bsLhMMNfENBjrhtN4CDRQjxAVGirUOo+xdxKL Mpy1eDen+57KoJ/OiH0taFaKqEwhbCcKyK6EFpx2qUHlEPR5rxvjMh4pnLwoC+AiqRln to6s5qrjHqGKp/lD4Q5LDLIStNcVhsFq9Btym+x1mbeysZKfERnPYIlJtuwKouIcptEj op162hsZ7JqosZFvaqA4lVJQzWdH6Mjv8cRo0mgZThmKEGvcfKJzEl2na61/0ZsXLTqd WxK9Spn1nf9JpQPcS4Inn7Z+mRyHy5eo5xhlQvklSJNvgln3EI9XWyWvZ6GjhQIAG/cm 12oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=eoboDEkHJ2jUv/vJLg0rxR1N98r4qI8BSSyE/TnTix0=; b=JxbmMAxkGoVuZz8zmz0THhXpoGigm0odGc5QWgj2XxfYiLAWyHIsPy7R0rgimnK7dO 0/SbcdhlY2oIM5nOHNmQRnjPmRgUy99arkN42Q2l2zubtAVcLbOlUpE8AvnkZn//hf7v ijOSO5LVr/Dn2u8hSkQRxANCC1Wfo9/1kZQy+1QiNYrNL7H5SSg2XSfanITfs1sQ0t6K 5xEc+oLvMUvWJ4ojG9j8co7JwBZmeNfqJYhGPFvXUE8FI+AWenHvw2lPwBpumxlnmHjX T01BKk8iuxKLZlY2Z46EhfilqNS8oFAVZ/t1itMK3DwdKE6CNFIRFDovh4OAREFfXhs2 bjPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kbSQs2Wj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si5133311pgt.115.2018.04.20.12.02.59; Fri, 20 Apr 2018 12:03:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kbSQs2Wj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbeDTTAK (ORCPT + 99 others); Fri, 20 Apr 2018 15:00:10 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:41917 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbeDTTAJ (ORCPT ); Fri, 20 Apr 2018 15:00:09 -0400 Received: by mail-yb0-f193.google.com with SMTP id e6-v6so1630448ybn.8 for ; Fri, 20 Apr 2018 12:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=eoboDEkHJ2jUv/vJLg0rxR1N98r4qI8BSSyE/TnTix0=; b=kbSQs2WjVy+V9tMCI8FoHIUWZuTHOPDq9EkpKSmyOUyHjEdLm0tvwcQiHmwIUU1NVe KzpQDvubRu57rH+wbnt/ivjO7ZcjdeYY/TB5w1eEtl3ZjrUHiPlRKUY+ByZS48hc0E8h dMurJgkHh9mzIdm6SKjQzzVbVwgQUCgLq4i6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eoboDEkHJ2jUv/vJLg0rxR1N98r4qI8BSSyE/TnTix0=; b=c71C0LlinMUjtEwRNQGTO+LXk6xTHL35Mqcs12qm3DcV/kvwn5SsDTiztlVJhoxLKF 3vqEkreedpYG/ZaRm3HvtYygB1oObToAELSUZNwC7E2xa7rgP8cVU7YqWDQ4+M0Bqk0E p5U5Qx+2ZLWKmglZLpPq7q8YyUwk+owNhjceWdZN1lsXhyIrDwWr1h625hx8kBEzUhSw OTTvaZ/CLMu8h7Pk1XCW7ckLajYQmuHWsauUeHMaF1HVk2a24y0LTBEiivYiQUFJQ3bV ar+HWzpcnk7lH0+miRH9ngpf9CDDd6OPoB3MR/z3aGvHfQ6K9+lV7ZDmkk8q2t5DLaVY J+Vw== X-Gm-Message-State: ALQs6tDbtK1pefIPkBLBHw1LAZotV/vlCzaoC7B3OGe0uVU9znbMy/yv S3koia+6e3JfxHIp4JaA0koxhA== X-Received: by 2002:a25:b44c:: with SMTP id c12-v6mr3852067ybg.78.1524250808628; Fri, 20 Apr 2018 12:00:08 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id k6-v6sm2776990ywi.11.2018.04.20.12.00.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 12:00:08 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Cc: Sean Paul , Rob Herring , Maxime Ripard , Archit Taneja , Andrzej Hajda , Laurent Pinchart , stable@vger.kernel.org, David Airlie , linux-kernel@vger.kernel.org Subject: [PATCH] drm/bridge: vga-dac: Fix edid memory leak Date: Fri, 20 Apr 2018 14:59:59 -0400 Message-Id: <20180420190007.1572-1-seanpaul@chromium.org> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org edid should be freed once it's finished being used. Fixes: 56fe8b6f4991 ("drm/bridge: Add RGB to VGA bridge support") Cc: Rob Herring Cc: Sean Paul Cc: Maxime Ripard Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: # v4.9+ Signed-off-by: Sean Paul --- drivers/gpu/drm/bridge/dumb-vga-dac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c index 498d5948d1a8..9837c8d69e69 100644 --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c @@ -56,7 +56,9 @@ static int dumb_vga_get_modes(struct drm_connector *connector) } drm_mode_connector_update_edid_property(connector, edid); - return drm_add_edid_modes(connector, edid); + ret = drm_add_edid_modes(connector, edid); + kfree(edid); + return ret; fallback: /* -- Sean Paul, Software Engineer, Google / Chromium OS