Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp389935pxm; Wed, 2 Mar 2022 18:07:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxI7fWHoEbPSCN0dswn9MXhZIpurxx+JTHhApQGrefGxll9S7ld2s6RQfUNzsQqfl61972v X-Received: by 2002:a17:902:7895:b0:14b:6b63:b3fa with SMTP id q21-20020a170902789500b0014b6b63b3famr33504821pll.156.1646273232346; Wed, 02 Mar 2022 18:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646273232; cv=none; d=google.com; s=arc-20160816; b=oiSexM2OekRB+8cOUZW3OJCgfu9nRuzJ13HoJJERCWbbET+u3B2WYZSWD0diry7/ty /9VYe60e7CkvDE9y+xrlg29mJIKBM1EYO1RqYksWnKJe3+P/E93YcqGAXV69IvCPQ3bC fqhJfXmXwohObD1R2zbpRxIqsdx53uB39vXjwll22ugw/HHKbm6AM3w+dLsjblpq03RM 2P0eS+ax5DYUBO64vqqrz+9nS5NDjHxifb+ZH6BA5lEaEwXrRwjVvfgIlI+b0fUZPGsj KG+s5Ovti40rrXTaSGelTjL2wKUJ+A36Ng3AWG4gOf3Z9D8Zol9/fFgXt0afUg4qXlyh Nrjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/B/qVPJ6uIJdog1etJxUaLhtEcABY8fXow+nh3nMsu4=; b=iCCxeL9S+oNJFwRgBDCbN09+L+oKktpNSDibU7yQAbsgXnJdH2IVwcM9ERNSKcVERO htbqmsvUOM9XhH743oELKW0UubfdOf+/TqZQdPjA7BJPbL3P9QH6QkR5gPsHaiVSTDsF oCv1xdECVwV3KzTYGJsvTNxL3QQ4SdFSXfcxw8JyhnMDScHBQ2m9VZGFMa834fwLqtat gxzvRA88Isc5f+GGMOq1Dl4CzXGTqZArjmdxstGVKcHWOaB4BMXOjV2xuMF/HBgfb29w rbQLKhBSXjmf36HLZ4Be3byvsW1VjJyFGOdY+ldDiPt1ozS6jECZHNPEy7yPvEr60Gxy 65qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=AR4voaIU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m7-20020a170902db0700b0014b78f81c76si841069plx.433.2022.03.02.18.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 18:07:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=AR4voaIU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D1F2513F93; Wed, 2 Mar 2022 18:07:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231653AbiCCCHw (ORCPT + 99 others); Wed, 2 Mar 2022 21:07:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbiCCCHv (ORCPT ); Wed, 2 Mar 2022 21:07:51 -0500 Received: from mail-m971.mail.163.com (mail-m971.mail.163.com [123.126.97.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 01CFC13F93 for ; Wed, 2 Mar 2022 18:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=/B/qV PJ6uIJdog1etJxUaLhtEcABY8fXow+nh3nMsu4=; b=AR4voaIU6Jr9DrUCUxjne zB2AXhxyRbrtSZ+irluIF5Pk6FYJ4+nPBopVKvuo7WVF/UnaFcEq+no52ybi1Pa7 c15nr5dBb7TDLLbRxCFbnb79Mcxfcy8EqQYizy9QIzuqMekKItDimFsN7Pt+Tl/l KCgrvkd20F5LGa7EKWEfh8= Received: from localhost.localdomain (unknown [218.106.182.227]) by smtp1 (Coremail) with SMTP id GdxpCgB3T4qnIiBi91UABw--.7592S4; Thu, 03 Mar 2022 10:06:54 +0800 (CST) From: Jianglei Nie To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-kernel@vger.kernel.org, Jianglei Nie Subject: [PATCH] tty: vt: consolemap: Add missing kfree() in con_do_clear_unimap() Date: Thu, 3 Mar 2022 10:06:30 +0800 Message-Id: <20220303020630.460257-1-niejianglei2021@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GdxpCgB3T4qnIiBi91UABw--.7592S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7GF4fWw47GFyUuryxCr1kGrg_yoWxZrX_Ga y8Cayfur4j939Yya13Cr15urWfZFZ5ZF1kWFnFqF9xt34DZw4xJ3y2vr9xWryUW3yrAFnx JFWvvr18Cr98WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRJCzAJUUUUU== X-Originating-IP: [218.106.182.227] X-CM-SenderInfo: xqlhyxxdqjzvrlsqjii6rwjhhfrp/1tbiPgK4jFxBqajsmQACsj X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should free p after con_release_unimap(p) like the call points of con_release_unimap() do in the same file. This patch adds the missing kfree() after con_release_unimap(p). Signed-off-by: Jianglei Nie --- drivers/tty/vt/consolemap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index d815ac98b39e..5279c3d27720 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c @@ -520,6 +520,7 @@ static int con_do_clear_unimap(struct vc_data *vc) p->refcount++; p->sum = 0; con_release_unimap(p); + kfree(p); } return 0; } -- 2.25.1