From patchwork Mon Jun 27 23:08:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 922692 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5RNBcSG030451 for ; Mon, 27 Jun 2011 23:11:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755417Ab1F0XLU (ORCPT ); Mon, 27 Jun 2011 19:11:20 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:34298 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755413Ab1F0XJL (ORCPT ); Mon, 27 Jun 2011 19:09:11 -0400 Received: by pvg12 with SMTP id 12so3140876pvg.19 for ; Mon, 27 Jun 2011 16:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=xmWzuqUJe4+SBHnLp5hauIqyWTrgVP9jPjcUaQKpDPI=; b=B54M2xC5biizhlBFd5F4U+aGw3THov1ziXcV3A/FxGbofRxT1EJNVk/7SOodVlUe44 CTMyP4qrIm40HLP5yIhJGb84gYSgebPizMnQkYdCWgLlfVaMFY/SHhBZNLkaBYIwWgeD SfDsElJx5lDfhtbdvOEz6H3ynUYjDYxr44Qhs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=k9sD3Y5n1AYrv/3f8aCiiNqxp+tg56gUPt+58l+MwwN/wNa+xKuY4nhdLf7QDiAI84 ZVTmMxPiedf2v/dNBrOOgJOMPSP/2yUZ2znPiikSFYPNc+Ai1yZvPhMoSM/QNjBYff24 Vus6e4Nfyz0nUueRTTxg6fCYLhaQZvcaiALf8= Received: by 10.68.7.194 with SMTP id l2mr3578208pba.155.1309216151087; Mon, 27 Jun 2011 16:09:11 -0700 (PDT) Received: from localhost.localdomain (bb116-14-44-68.singnet.com.sg [116.14.44.68]) by mx.google.com with ESMTPS id g8sm4634172pba.53.2011.06.27.16.09.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Jun 2011 16:09:10 -0700 (PDT) From: Daniel J Blueman To: Paul Mundt Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel J Blueman Subject: [PATCH] vesafb: fix memory leak Date: Tue, 28 Jun 2011 07:08:53 +0800 Message-Id: <1309216133-3118-1-git-send-email-daniel.blueman@gmail.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 27 Jun 2011 23:11:38 +0000 (UTC) When releasing framebuffer, free colourmap allocations. Signed-off-by: Daniel J Blueman --- drivers/video/vesafb.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index a99bbe8..501b340 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c @@ -175,6 +175,7 @@ static int vesafb_setcolreg(unsigned regno, unsigned red, unsigned green, static void vesafb_destroy(struct fb_info *info) { + fb_dealloc_cmap(&info->cmap); if (info->screen_base) iounmap(info->screen_base); release_mem_region(info->apertures->ranges[0].base, info->apertures->ranges[0].size);