From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83A48CA9EC5 for ; Wed, 30 Oct 2019 11:44:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 536DB2083E for ; Wed, 30 Oct 2019 11:44:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726524AbfJ3Lo0 (ORCPT ); Wed, 30 Oct 2019 07:44:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:57172 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726088AbfJ3Lo0 (ORCPT ); Wed, 30 Oct 2019 07:44:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 35BB4AC45; Wed, 30 Oct 2019 11:44:24 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 7BC6ADA783; Wed, 30 Oct 2019 12:44:32 +0100 (CET) Date: Wed, 30 Oct 2019 12:44:31 +0100 From: David Sterba To: Navid Emamdoost Cc: emamd001@umn.edu, smccaman@umn.edu, kjlu@umn.edu, David Sterba , Jeff Layton , Kees Cook , Deepa Dinamani , "Gustavo A. R. Silva" , Thomas Gleixner , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] fs: affs: fix a memory leak in affs_remount Message-ID: <20191030114430.GE3001@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Navid Emamdoost , emamd001@umn.edu, smccaman@umn.edu, kjlu@umn.edu, David Sterba , Jeff Layton , Kees Cook , Deepa Dinamani , "Gustavo A. R. Silva" , Thomas Gleixner , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191002092221.GJ2751@suse.cz> <20191002215242.14317-1-navid.emamdoost@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191002215242.14317-1-navid.emamdoost@gmail.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 02, 2019 at 04:52:37PM -0500, Navid Emamdoost wrote: > In affs_remount if data is provided it is duplicated into new_opts. > The allocated memory for new_opts is only released if pare_options fail. > But the variable is not used anywhere. So the new_opts should be > removed. > > Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling") > Signed-off-by: Navid Emamdoost > --- > Changes in v2: > -- fix typo > Changes in v3: > -- remove the call to kstrdup, as new_opts is not used anymore. Added it to affs queue. There are still typos in the changelog and this was pointed out, and v3 lacks the explanations I replied to v2. I'll fix it up.