Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2301383pxb; Sun, 17 Apr 2022 17:53:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3+xNALFKzpTLmq2l8uONR4LePhxSSwZykaAFbo3dqQF/aWu4iun/mn0pQwNhMJRyP0W42 X-Received: by 2002:a17:907:7249:b0:6ef:aed9:762 with SMTP id ds9-20020a170907724900b006efaed90762mr2276603ejc.198.1650243223638; Sun, 17 Apr 2022 17:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650243223; cv=none; d=google.com; s=arc-20160816; b=W+9xAoMAhN8alRDS3Cw6GZHytq9j7MO5y8P2+NiL0aZACmM1aVNhCPNOFr8ZHB2Nss hD0UGQNstAp5E++BzAvgHb5IeVptdyS3tefjwusNF8t91fFUq1DHVGgbacBFgGWEY1EJ ZifhrxHVzbT3MsUrepdwKo4voIFLivlCrXISdWrB5EyRnx1Kz8H4uVRlP8fKv7j+ZdJf rQXTiY2ljcJ8xktiqth/1565dAqCBNWUb8JR9uMGUV8FEdQaRk0Pv2gKVeCG3V5be+zk glqe2TlgzQ8mRdQPviGTS/BsuWVuMa5g8Ahds/HB8v2V9K4AifHD3Yj0jZHH0D/NFq9I V7RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=siAKpMcN2i6Q5zwPWMFzdjMytkBZWIwEIG4ky16AcDE=; b=YOTwvNN8693yuyfJTFjGHffvqcclVHM1/XdyjY3hS0SlCUSHO4P2ZJxPV1leVg6HxO 5SByCoDVtOOMdOsYXbb9O4+YcE9QOEVl9N5yf6yFxXAuM8F0Mrw0Lu9clGBZ+yzZoHxd yjvDG58xpbZ9ePdotx4HbZ0X+YuWxTBnGVcgAJEL47k/9cH3CvwrV6+wUaqZAxAR8cEZ 59133Z01PPN3IHsWkCxn81nsAstYLz0VzwbzReHxeb1uMS/GP9f5VhJLDAUd1q6MW4Vy HOoZ8E7HmE1NOygaV/tCmxsBMSM4w2XERN7S8jKKj+eP/szqmyGx8by0o4GpEfrrxAGv cAzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=POT4kupD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a170906494200b006e888cbdec6si5573622ejt.282.2022.04.17.17.53.00; Sun, 17 Apr 2022 17:53:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=POT4kupD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233900AbiDQUom (ORCPT + 99 others); Sun, 17 Apr 2022 16:44:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiDQUol (ORCPT ); Sun, 17 Apr 2022 16:44:41 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99A856429 for ; Sun, 17 Apr 2022 13:42:04 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id o18so9020587qtk.7 for ; Sun, 17 Apr 2022 13:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=siAKpMcN2i6Q5zwPWMFzdjMytkBZWIwEIG4ky16AcDE=; b=POT4kupDxVMVYxPM9uQ91fxJF+fbbvfcfAK6+sd4/52H+jBSq/EHv+JVS201vbVhTI 58Ziu9h2KBrJMhG90YOixxlX5mFL3miqMxgkP+CWBQmQKAYw7uP7dvh/SlG/B4A6LQE5 4hYureZf3iXY1B2JOyjwnaECwkaY4YxS/y/iy6ffD4rXUv9jjcZDklQfkTs9VCQwltIl 17ZqlOOG+da029OX07OoI8PFbmvzBVo1L5bINDSoU6FvtCBbTAsJeEUYO8jr25hs0tE3 IJk4sYY2cm5icEDjZ9MGfZa/Sbe9xyCgf7w44s50LieRSLt1SzdelfYd4SSCWylHAear YhjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=siAKpMcN2i6Q5zwPWMFzdjMytkBZWIwEIG4ky16AcDE=; b=JRvw0TQUD4Li/xNiFVq8AzyzaRlhOwEyVjoTVydFMRSQYSsrWmoePs+W4x8TsjuI0n 2vM9ZDlF6+R3ug6otY1/U/RGAzj6ATGKWzyoIf+WpzKU/IR+7kdSS6CQYbn6tyDX6xkW 61mXEmpADaWtcaPEtiWFXEb00M02SfEXwaWnxBPSCVcE7G0YV/j/+CQf7Nqe4dedtffC 3CMFLf8rihBmvS9m91ZyOGYK9Zl6h1n1zYbZFebyO6RLD7L9Y6DQPTeCga1AQLUMVoM9 tESNHj+rhd53JRmmWwObKZGJHigxV4d3IIkd4JWYPWEVvzzQmKmiul3//ymc0HYqfPyl N6eA== X-Gm-Message-State: AOAM532i/mP2wyQObZRi2mkjBq6MxF8DhPLMuVF6Q9/XKsfePrGAz7AC lORcBRQ5un1cofhrbF+DkAw= X-Received: by 2002:a05:622a:1109:b0:2f1:f7e9:1b3 with SMTP id e9-20020a05622a110900b002f1f7e901b3mr3868301qty.671.1650228123726; Sun, 17 Apr 2022 13:42:03 -0700 (PDT) Received: from jaehee-ThinkPad-X1-Extreme ([2607:fb90:50e6:61ed:4df2:ed9f:52ea:476e]) by smtp.gmail.com with ESMTPSA id y20-20020a05622a121400b002eefd7bf5basm6706502qtx.63.2022.04.17.13.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Apr 2022 13:42:02 -0700 (PDT) Date: Sun, 17 Apr 2022 16:42:00 -0400 From: Jaehee Park To: Pavel Skripkin Cc: "Fabio M. De Francesco" , Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: Re: [PATCH v2 1/6] staging: r8188eu: remove unused member free_bss_buf Message-ID: <20220417204200.GA236965@jaehee-ThinkPad-X1-Extreme> References: <3608313.MHq7AAxBmi@leap> <20220417201415.GA233554@jaehee-ThinkPad-X1-Extreme> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Sun, Apr 17, 2022 at 11:16:38PM +0300, Pavel Skripkin wrote: > Hi Jaehee, > > On 4/17/22 23:14, Jaehee Park wrote: > > My understanding of Pavel's response is the free_bss_buf member of the > > pmlmepriv structure wasn't being used anywhere and that the > > rtw_free_mlme_riv_ie_data function frees the memory of the pmlmepriv > > structure so the second check is redundant. > > > > However, as Fabio said, the free_bss_buf member is being used and pbuf > > memory is not being freed. > > So I'll revert the patch as it was originally (which was just removing > > the {} around the single if statement). > > > > Why just `pbuf` allocation can't be removed? This memory is just unused, > isn't it? > > > > > With regards, > Pavel Skripkin The free_bss_buf member is unused. So it can just be removed right? I guess I'm confused by what Pablo is saying about causing a memory leak by getting rid of the pointer to the memory allocated by pbuf. Sorry if I misunderstood. Thanks, Jaehee