Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4124393ybl; Tue, 20 Aug 2019 07:21:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVNF4tQx5dqfLnFMrPa0B3pBYmP2w2OVpf2WYb9eZpO77TYt66jFKcSCN0z2YLCPfvcRXV X-Received: by 2002:a17:90a:f0c6:: with SMTP id fa6mr213651pjb.131.1566310863377; Tue, 20 Aug 2019 07:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566310863; cv=none; d=google.com; s=arc-20160816; b=I2hKy3mAHh88UvAG2JTdURGKlvAS6VAZeScuWriHZyu6eIEo4cefZsMmsPsF0bssfP D/ASsLjjCTKjYvXG2axHYf4y/lr7nqw4tuNscPXCFzcgOsE4P4tW5CU36b2m9B9vPU+D I4qqRfSkT5l86r+2ujUaSm0RMbvbagzAhoww3Wp3wCKJHH2K10g0CzSJwoJb1Er5Aftk ALY2p8j/kJE3cTVAPwvBwvlMLsz5G24ivFBhpHu7HLGn0S6juvIc7WqHrZx4xGrJ19C1 DU9GRZPPKkAi24nsz/uIwE3aF2LRzB3LwRE4u3c79jU11EGPTDYiodFou8UqJC7XJC6Y G5AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=838NPqta13bqgyCrYK41UyrEU6mGcDEerMp5IHrJ4wM=; b=bp4faRxeVkvfMJYDR5APzEzvloexX4fOh2dH/mScVnOWduIG0pD99dKyFAaFzwcTce p+KTaYhdR6kNA66W2Da+GXk5nDDwCymb3NY3PUKciRdrKSoAD9r4Tif9yWHal/jyiQlc K+hi30OFjmtg72eAUibxuSEu3llXgdALf1fV0wfcA8T00a6DdSFuBLYpPaMGWMFxzeZf NmQCJYOWOFJZXPPCUms5vGz7U5+8yJpxljXmrAgH7dimHKN2hlVHXsZA7LuW8przn83a yZJSJkmqkY+4GmoGqohBpbejIKUnwFqRdjwfecvEIJHNuaDqYYSy4ZJedGwfRb+lktMa rs9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bobcopeland-com.20150623.gappssmtp.com header.s=20150623 header.b=Kfnla0tv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z193si12078240pgd.235.2019.08.20.07.20.47; Tue, 20 Aug 2019 07:21:03 -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=@bobcopeland-com.20150623.gappssmtp.com header.s=20150623 header.b=Kfnla0tv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730226AbfHTOS0 (ORCPT + 99 others); Tue, 20 Aug 2019 10:18:26 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:46439 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729975AbfHTOSZ (ORCPT ); Tue, 20 Aug 2019 10:18:25 -0400 Received: by mail-io1-f65.google.com with SMTP id x4so12455058iog.13 for ; Tue, 20 Aug 2019 07:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bobcopeland-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=838NPqta13bqgyCrYK41UyrEU6mGcDEerMp5IHrJ4wM=; b=Kfnla0tviD817tYZdPwb2uA2HDNSUtBR12ZbWHcHId5JmtFmbvh8/eGNzF8lr/hr9z v6m3JN+x+i1whykrYHmo3SDPcCeo+TPtpbrUTjsz7UK9NBYN9D/LvEAEGNkZ9rNKVDqs v3bNnyXRY8FlQJtnaBRrJ0CsspH9HuFr3leEIwWOihS+KZU/v+p885SCP2Zb/tiSfAL/ UKL4ubb9UNcx8g2dXij6VbAX/IQDJyjiIFvUJWlMiNITg9yPWFz4kwaVlcaW/FHxFqj2 mz74NRc9FCLqh/UlYlCOwg8ESbDRfUxKFJTk74LRwbe2wVTn8i9eiF0Kit7hST/BEfq6 HuFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=838NPqta13bqgyCrYK41UyrEU6mGcDEerMp5IHrJ4wM=; b=Or9thGdRWiSYE86bQArKwynXVZfy8tOou7S+F196l9SuEVbfZyv0FsqluwmizOj0TB vH96I8LiNLZbPi2yGoGyiIEiCMkTc6/dX/IyxJ9YqQEM3mIPKWiSmFmTOiw4X6RN05gR fhlLzmYfrdONyyhF3t2e/CbsBZnCuxw90CKLoTLN6DH0YFiDyIfwCTEdmzCvmk3729Eq yqAygjd5i3Z+ufo6VbTbTMSnu3GeJi9uSGwfWSD+otUdrdpd5erWLUo/++F+7+d7f5DG A1HFvsWM0yyGHZW5ewe0A9BEenEFogVef7bZmbHTaMB8aPMmK4FLP72OdHm45WrOYVi3 NE7w== X-Gm-Message-State: APjAAAVnWPyUSpTCZJrohgPiabQ79oU3uqDSzpbYpAwoI1OLCpLg8wQe +z8qW3XTneO7BsucaOfDsfJiMA== X-Received: by 2002:a02:8409:: with SMTP id k9mr4036631jah.122.1566310704798; Tue, 20 Aug 2019 07:18:24 -0700 (PDT) Received: from hash (CPE30b5c2fb365b-CMa456cc3dfbbf.cpe.net.cable.rogers.com. [99.232.51.173]) by smtp.gmail.com with ESMTPSA id m10sm14241474ioj.75.2019.08.20.07.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 07:18:24 -0700 (PDT) Received: from bob by hash with local (Exim 4.92) (envelope-from ) id 1i04vl-0001YN-Fd; Tue, 20 Aug 2019 10:16:13 -0400 Date: Tue, 20 Aug 2019 10:16:13 -0400 From: Bob Copeland To: Wenwen Wang Cc: "open list:OMFS FILESYSTEM" , open list Subject: Re: [PATCH] omfs: Fix a memory leak bug Message-ID: <20190820141613.GA5634@localhost> References: <1566282180-10485-1-git-send-email-wenwen@cs.uga.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1566282180-10485-1-git-send-email-wenwen@cs.uga.edu> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 01:22:59AM -0500, Wenwen Wang wrote: > In omfs_get_imap(), 'sbi->s_imap' is allocated through kcalloc(). However, > it is not deallocated in the following execution if 'block' is not less > than 'sbi->s_num_blocks', leading to a memory leak bug. To fix this issue, > go to the 'nomem_free' label to free 'sbi->s_imap'. Nice catch, thanks. Acked-by: Bob Copeland -- Bob Copeland %% https://bobcopeland.com/