Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp8845612pxu; Sun, 27 Dec 2020 22:49:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJykkP7CcrovCVV+NA+pjUtIjXplFGFcy76ifYCqt4Mc68/HIKbDgJc/k9RsxifitOt648Yz X-Received: by 2002:a17:906:3b4d:: with SMTP id h13mr40240180ejf.289.1609138177945; Sun, 27 Dec 2020 22:49:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609138177; cv=none; d=google.com; s=arc-20160816; b=tSCgzzF4+xSXhVGF9Cm0g8rq1zc4K9SjJBGuZZUbnPFmI24MrbsVoDhAugOXx/EqQO xTCJch7FqHRzIJb1z2yAAsbtmHXM6a7tVj0QnfxfNiXJYuhIvGBBBeYOdeLGmW3+YZTw 8qNTzCVRYf1l1AdkNxkk7wl5Rxhg9G2YA/9AvGcr3YhtySMkuIUSIueVCLB95IEgf99O J6/iuAAdPOoAZPPabX50bTFpeYBFU7wz3SZaO/ycDLbz1roo94PAlnOYC4VbTHby72Kh 6ub3ZGXHke5MFgimW8K1FVZk3OL6MzUMhayLtY+Xm9mqVvUDJWiH/jcAfRmx4d+QwBNU QH6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=EyC5xIrBqlSQLTjiRSrDM2FtzhrjMO/QlB5tdJsMwFo=; b=A1T2wD1qJhTHCjSQ4z3bEJPq7KNVXrdQT+7YvGsh2XUpSqirO0OrmzdUelq7TxAnsN rtmiRCYTaUKDzYbnmnE1kRHay2obMJJp+vbTPSinSzWdBa2Pf5uF5RXnR+NIyZsqPeOq OJU9kLIgdRz1RLwoEoh8igbZ6jIA00VEz3VldTY8ybPmuIBIFgW18M83O45qYmEjlW3n ShlQwaQf8dvzjLSki0uxvIhD2CDprKuRhomHw8onHUWXU9BnR5yxUNJ9Rcwtqvlm8/sF 5RAQKMj2DI2ZmYk2CoDhkHM4KgJpDJt4WRIRNBt5kjDGtASIAhknEDJekqlAGRoFAiK/ ED6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ea9TNGe+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a17si11377765ejf.419.2020.12.27.22.49.15; Sun, 27 Dec 2020 22:49:37 -0800 (PST) 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=@google.com header.s=20161025 header.b=Ea9TNGe+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726392AbgL1GrU (ORCPT + 99 others); Mon, 28 Dec 2020 01:47:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbgL1GrT (ORCPT ); Mon, 28 Dec 2020 01:47:19 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71C67C061798 for ; Sun, 27 Dec 2020 22:46:39 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id w8so16705215ybj.14 for ; Sun, 27 Dec 2020 22:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=EyC5xIrBqlSQLTjiRSrDM2FtzhrjMO/QlB5tdJsMwFo=; b=Ea9TNGe+6udK0VenKGDFdt7HfSAxnSq9AkO8jQCvYXO1dDQFntSXmaZ3XpLzjPJhK7 S1SqZ78WIjaUGRFwLJC6kJKUfgNP73ft8wzNYaNtbBYN1l13Eg1Aucd1XNXoTNBBzE+U 5qskxxWmuXJKnM7DfpfGTSBlkUdOLDJWfHg9YGf0xh8DLZ1XMABINkJ9CK4xPFXXp4T6 RiZZ2/GYsVQrMfbTmx2aIxdPy5gJroWbh4gdqk7Ls8tB5H2LIZJ+DDAw6i4ZSszKmzSw LpWLdblZxAK0NWFQm81qqhZ4KqdpxlF0LA4Dg8x5g3sAIrN2DAHvpLHKlrirHx+skml7 T/BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=EyC5xIrBqlSQLTjiRSrDM2FtzhrjMO/QlB5tdJsMwFo=; b=m2TMVAtvLFeDs3yOomatF0VlzTZV3q6sF16+WLlJ9OlytkWdgduSbtYBgVJO2V+SML c5OVTNHzJJJvcVTBmXCKhpa76sdjZ2HuoYWXs5DEJhrolQ18l6OPF7OXgWv+8oyck+P1 tqsC5k+MQW7Sfs7fU7Do9lGXKoQhT2dGx5M3Q4J/C45QwYr0uKzoZq8BfBSL7LJMgPOo Iwe1yIlzHs/Iwyy6599FE5KMFJyhi+QZWXboZZ8uXyj6k5Cdu2wOBbQ10w35xatuQymk 9Hdk4UAhs4DT0ZFjsTo1Nz2M6qbpiKRgMJKxY3hjLAP7Oy4rK+7BMr9VOfJrB8OzMQYp bYqg== X-Gm-Message-State: AOAM533QMJE9wsppZA6nKrBkBumXSF/cuIE6YlBWHkUYWkWPehOT0378 UTswfd3+97HmDSZ1dN0EQjbCefErONffrRK435U/DjU3LjmRXP2/VFo63kIQBcFD2vUQ7qIoMk2 r+xLYGqKzDyTDnK9/1kCnz+pv4ytTYRJ9V45rDFPA8VtEwcDj0cJ7GaiRAJcSZb2wY6/Yy3EGkT 5OpPOIWvj+Z7E= Sender: "howardchung via sendgmr" X-Received: from howardchung-p920.tpe.corp.google.com ([2401:fa00:1:10:f693:9fff:fef4:4e45]) (user=howardchung job=sendgmr) by 2002:a25:8050:: with SMTP id a16mr38915877ybn.146.1609137998689; Sun, 27 Dec 2020 22:46:38 -0800 (PST) Date: Mon, 28 Dec 2020 14:46:13 +0800 In-Reply-To: <20201228144543.Bluez.v1.1.Ie32770d0eed2e7739ce9d17d920766fb6aee8583@changeid> Message-Id: <20201228144543.Bluez.v1.4.I43884adadc00a5095dd03d2261a71dc2ba80d986@changeid> Mime-Version: 1.0 References: <20201228144543.Bluez.v1.1.Ie32770d0eed2e7739ce9d17d920766fb6aee8583@changeid> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog Subject: [Bluez PATCH v1 4/4] shared/mgmt: Fix memory leak in mgmt_tlv_list From: Howard Chung To: linux-bluetooth , luiz.dentz@gmail.com Cc: mmandlik@chromium.org, mcchou@chromium.org, apusaka@chromium.org, Howard Chung Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch freed the mgmt_tlv properly in mgmt_tlv_list_free. Reviewed-by: apusaka@chromium.org Reviewed-by: mcchou@chromium.org --- src/shared/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c index bdc4bdd9e66b..19b5466f9071 100644 --- a/src/shared/mgmt.c +++ b/src/shared/mgmt.c @@ -595,7 +595,7 @@ static void mgmt_tlv_free(struct mgmt_tlv *entry) void mgmt_tlv_list_free(struct mgmt_tlv_list *tlv_list) { - queue_destroy(tlv_list->tlv_queue, NULL); + queue_destroy(tlv_list->tlv_queue, mgmt_tlv_free); free(tlv_list); } -- 2.29.2.729.g45daf8777d-goog