From patchwork Thu Apr 6 11:40:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guanqin Miao X-Patchwork-Id: 13203203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B636CC7618D for ; Thu, 6 Apr 2023 11:46:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236780AbjDFLqm (ORCPT ); Thu, 6 Apr 2023 07:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbjDFLqP (ORCPT ); Thu, 6 Apr 2023 07:46:15 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74C45B770 for ; Thu, 6 Apr 2023 04:42:18 -0700 (PDT) Received: from kwepemi500002.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Psfg43HsTzrZ6v; Thu, 6 Apr 2023 19:39:44 +0800 (CST) Received: from huawei.com (10.175.101.6) by kwepemi500002.china.huawei.com (7.221.188.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 6 Apr 2023 19:41:00 +0800 From: Guanqin Miao To: , , , CC: , , Subject: [PATCH 0/4] Fix memory leak for Manage Assemble Kill mdadm Date: Thu, 6 Apr 2023 19:40:07 +0800 Message-ID: <20230406114011.3297545-1-miaoguanqin@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500002.china.huawei.com (7.221.188.171) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org When we test mdadm with asan,i we found some memory leaks. We fix these memory leaks based on code logic. Guanqin Miao (4): Fix memory leak in file Assemble Fix memory leak in file Kill Fix memory leak in file Manage Fix memory leak in file mdadm Assemble.c | 15 +++++++++++++-- Kill.c | 9 ++++++++- Manage.c | 15 ++++++++++++++- mdadm.c | 4 ++++ 4 files changed, 39 insertions(+), 4 deletions(-)