Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5006232pxj; Wed, 12 May 2021 19:12:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5oaXBiOCGXEeYoq03HfFutrM9knxcLhDTRFhP0TMhGoNdXhMt6ele7kbav2zz1aZi7spX X-Received: by 2002:a9d:6198:: with SMTP id g24mr25739460otk.365.1620871948680; Wed, 12 May 2021 19:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620871948; cv=none; d=google.com; s=arc-20160816; b=lk8lLAUKDCtIzqA/EOaEnCEPu3Kvs9HVRIPZfp8ps44bKajPVEFPq7OM0waVmrHXPj TEpm6rV2gBw+7/uASQoPTr7jDOcPNzD1NVA9gOw7k5Ps/0dtQq7maEOimKJfOsnE3UV8 6UpFZeI2aRuwEjf+QSicXKf9ICY3cSDO7HOewTNtikcpJlMTklZtX6Bp23RJ8mXtaZJm uUp4D1a1iSTbGvbJ7g/mW4U1Xf0oXMUYEoLwwq9dpIQdm3ZE89pBWst5uMqtkzjCOwEO 7agVPSiY5cCdVO3P93Io9p5IGL3ww+7P/ZYYxJLnlrVDSgs9F/lrZDN4g9BZ5FjvNEkP xutQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:to:from :dkim-signature; bh=ICMQylqhCgMRtr83Y58Bbw7PMiU8fqMBGPQQmoz74mo=; b=zRQQgQkJjqgTzgeGePNl80ovKYE32QGCnCOXZLQrvIpOt3EnYftsACTc0nc2Veyuuh 98JQvtmzRReA1eaWMwS3dOt0xJjY+C/i7Y4d+tman0IiilmGKIMCCegWGX++7a1jaM5d G0uic7Vv4UpBsr6bFKZf3aAxALBvUE6Pq12bbSOXf6T82/2DbwKskKFpIbOu2Yhk/WRc 5W+iR5SDMZ7YDJeo0k7RcZ2qW4LQZPfAPH8On+mr3jxqGHplGT6uc3qpxF6bC1gzwOYA Ixbon0FEWJDKL44Dn/R1Xx+PsvdozAEnH9gvCw429YViO6eMhzQCAH++iUuFycYGD0it ssgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RujhAk8O; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b80si2032016oii.27.2021.05.12.19.12.00; Wed, 12 May 2021 19:12:28 -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=@redhat.com header.s=mimecast20190719 header.b=RujhAk8O; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbhEMCMK (ORCPT + 99 others); Wed, 12 May 2021 22:12:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40317 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbhEMCMJ (ORCPT ); Wed, 12 May 2021 22:12:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620871860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ICMQylqhCgMRtr83Y58Bbw7PMiU8fqMBGPQQmoz74mo=; b=RujhAk8OoTHELDLSEGcr+3BomzuyhNoOx7n3ZeIU8hMfm/fgOX7jBZF9u+lH+LoHPd9MId rCD2e2FLj1cyOzYx+DsCHO7IR4+DLBPo0fov2zdpbWuyAsDQE5c4J+cOxjLf4VULQmgxcF hIPHl8xw0+yLgG5nvpCnt6r1q6ThPRQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-hoFXd1VIMeSOiUD_8440Kg-1; Wed, 12 May 2021 22:10:58 -0400 X-MC-Unique: hoFXd1VIMeSOiUD_8440Kg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9FB02FC95; Thu, 13 May 2021 02:10:57 +0000 (UTC) Received: from x2.localnet (ovpn-112-55.rdu2.redhat.com [10.10.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A9995D6AC; Thu, 13 May 2021 02:10:57 +0000 (UTC) From: Steve Grubb To: linux-bluetooth@vger.kernel.org, Bastien Nocera Subject: Re: [PATCH 1/1] Fix various memory leaks Date: Wed, 12 May 2021 22:10:55 -0400 Message-ID: <11748148.O9o76ZdvQC@x2> Organization: Red Hat In-Reply-To: <6af830fc74d50c722ecb9855038a00bf6673d4e5.camel@hadess.net> References: <20210512133932.4e2b4bd0@ivy-bridge> <6af830fc74d50c722ecb9855038a00bf6673d4e5.camel@hadess.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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? -Steve