Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp779946pxj; Thu, 13 May 2021 17:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVM7iK4rgdmLBQifgMFY7jCuhAbiVX7XiRvCWkiIlj6Ub5yDCeHinvTzzVxquYsB7R+C/6 X-Received: by 2002:a92:c74b:: with SMTP id y11mr4902511ilp.302.1620951522893; Thu, 13 May 2021 17:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620951522; cv=none; d=google.com; s=arc-20160816; b=pwPYQxsiIBth2/6EAluux4eu6kDRSjarxGI4mutd2e0V31y1omCACwZpnjYiXx3dwO cW7iB+6B3tsqiBBIYl7Dhcy0Imih7y7RiuWWaelXJUUY+OoG0lvJ1IF0oPqlH31GE2AG h9QNN3AmlUYL6pmJFLyCH7G5aiyl8REeSUkk0j9KSvS8iKVNCwcsmFWRiF2YBh3u0OPy Yb8wqLTwy5Qludjw2DbKkpXIAHCjcCl5k3EYLkymfHZCMyUSTbAXcMpXZcHiXp23jSd+ 4+qmFPJ/y6NgtbLHDen8p+9FHjUhgCyaPHr34+cKaCE+mNORPRIOKvpdt1ZGaCjM0F5h zWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9gSJvxq9TZXq1GwaseZEPaKwcE1dnQixxohqgAeeFXo=; b=wWZ6br4JYamNnoSoChg6bX2l0ZsMco4RVq+8frw5v1Tt+6+RSvQKAhikfk9FovlSRR x52RibzTM8mv+9zhPeenJLRR9Ikc9LCOpTHvzbp64wXH5ZNWzdt5wsVrr3UsPM+CT8rJ R+AO+2I3kfRPkApDyciktHmJlPFIXnDuqIqQU8yGOU/9WAqxSybYPxCxSAe5fvvTB2lp 7TCjRztSSIt3Rk5c0kohg9ZhdtU6JTo/PoHuwYKUYhncFPAkdxF3TjziP+7JuBLtBjk6 TrJ1ndnhu5P8vFgbIT58Z+lshih1aSWL6A4izaY3v9LqqpVvOdmxaBnUiAAKJYSJSth5 QZlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ixMpTGYf; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j188si6226985jac.58.2021.05.13.17.18.28; Thu, 13 May 2021 17:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ixMpTGYf; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S232950AbhEMUeE (ORCPT + 99 others); Thu, 13 May 2021 16:34:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232971AbhEMUeC (ORCPT ); Thu, 13 May 2021 16:34:02 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85A20C061574 for ; Thu, 13 May 2021 13:32:52 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id g38so36264754ybi.12 for ; Thu, 13 May 2021 13:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9gSJvxq9TZXq1GwaseZEPaKwcE1dnQixxohqgAeeFXo=; b=ixMpTGYfNiho9J8nc/X6oD3d2bp8YRQsbLYaa2Gh26K0LLGzZDYaFL63KzKiIiRSUs fHW5GjL3utUKu66QEFS5c9H43HAQtG+pSo99GLH47DafInxZLC8hTaYqCmqzSJ2Dpvvj l8E05AWeAGCMI3T5jmF3L5S22Ckw9HTBZl2DIsRhxnihA2g7e9RCry8HZYhM/IZA3hGw BZcu3OxLtWlKrDEu+/mzz71MT/5/3CFw+L925sI8yHZOiLS1cLrtPcVsBycWNwsbPC9M x4dPCk0ZP/9B1HJobBJH8OxLaHdyC7wOqSblWrSyEcdHkCjAW9arsOCoR6qhhM7MZ9JJ ILXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9gSJvxq9TZXq1GwaseZEPaKwcE1dnQixxohqgAeeFXo=; b=mJ3BoJip3lKJjq5vzuZRstgfNOnVfMsxv9wdievvahLTD3fMsAJDtksSHHVoytAsxr xY1w6jSHzymiIda7ZtnvncVO+swxHlc7vS2cf6/uG90hytJjH4lFR/RXlooSMkqJh1MV I4OG+SLhNKia9tf5i2rG4dedhteC7PrwbbHfQe2YERJj+HC/gtDtEyhOkpcwWqCghWpB XrNKk/ycujsbaxOf83/Hee1DOrAaHPHID+ZC3Joqs2KNFjbhuidamR4XOWjKo8icVRto vESTR4JE5iZVStqjvqg6sMN13zcGybCO3LOzjfFz9y0EZgS1uZdrciB6GDXlPZ+F4u5x fFvg== X-Gm-Message-State: AOAM532SQKfjt9wfj7iAHMKZ3CgvICQr1dLpDZFUdyESfMtvovwEkS1c 6gqWkFBHi2fBwtI/s2+8dk28Pom6bslpEU4b+h4= X-Received: by 2002:a25:ad8b:: with SMTP id z11mr30920248ybi.91.1620937971792; Thu, 13 May 2021 13:32:51 -0700 (PDT) MIME-Version: 1.0 References: <20210512133932.4e2b4bd0@ivy-bridge> <6af830fc74d50c722ecb9855038a00bf6673d4e5.camel@hadess.net> <11748148.O9o76ZdvQC@x2> In-Reply-To: <11748148.O9o76ZdvQC@x2> From: Luiz Augusto von Dentz Date: Thu, 13 May 2021 13:32:41 -0700 Message-ID: Subject: Re: [PATCH 1/1] Fix various memory leaks To: Steve Grubb Cc: "linux-bluetooth@vger.kernel.org" , Bastien Nocera Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Steve, On Wed, May 12, 2021 at 7:12 PM Steve Grubb wrote: > > On Wednesday, May 12, 2021 6:35:54 PM EDT Bastien Nocera wrote: > > On Wed, 2021-05-12 at 13:39 -0400, Steve Grubb wrote: > > > diff --git a/obexd/plugins/filesystem.c b/obexd/plugins/filesystem.c > > > index 09bff8ad0..44e3cf3d2 100644 > > > --- a/obexd/plugins/filesystem.c > > > +++ b/obexd/plugins/filesystem.c > > > @@ -415,7 +415,7 @@ static void *capability_open(const char *name, > > > int oflag, mode_t mode, > > > goto fail; > > > } > > > > > > - object->buffer = g_string_new(buf); > > > + object->buffer = buf; > > > > > > if (size) > > > *size = object->buffer->len; > > > > Pretty certain this is wrong. > > Yeah, now that you mention it...that is a GString object. I guess we > g_free(buf) right after the g_string_new(). Should I resend just that one > patch or do I need to regenerate all 7 emails? Please resend as v7, also while at it remove the signed-off-by as we don't use that in userspace. -- Luiz Augusto von Dentz