Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1859068ybk; Thu, 21 May 2020 17:38:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGQsgUlBec8OBWYemOovABn9fK/TNQsucviebb96YSvVe6q/PrNEH05uQzX405tghUyyR6 X-Received: by 2002:a17:906:1c94:: with SMTP id g20mr5827754ejh.319.1590107914743; Thu, 21 May 2020 17:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590107914; cv=none; d=google.com; s=arc-20160816; b=SXlRPPHcaTxTKbZU2sCVTqDIf9Kjwp8LOzVbEjstkhEcTui88fPg0SZqqqg5zEUhgQ WT6IN84mFUJqJX6+fS4v16Da+/FLPTFT7a5H0ncxwr4jTd6tmQf3XztU19ckSmsJDVdW SrWznHxxNQjUIOQ6k4jZt7ZV1w37ybMgqHKkSDXJx26Gk1hnbgKbSRJyT3wGtyv3Uhdl RkwrDDkJQAzXJ5rm6nMHoe0OskbEctxwwc/XEOLJG3O61fEdm8kjp1gtz56Xh+4dRM1G DxEkv1lwWqz67CMUAAn6GWaEWY8XcLbBLAkVBnlxDNMstYmobL7GErPeSh5qI294W6CX mONQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=dHkrxgpU4PnLaErjGoqa7M97//uHKmVFJiQJ9iqgXhg=; b=sTs4eZ6YknLhLz2em44zFBQfnjupbFtWAODDVT1KLXPR8jz8Ud9Tae0QRGpyNCZ4z9 rQ2ZVZSe4YEKXvPP14JJNT84275dTfqfNeouiWC1jCosIpADjq7p0F+eEh3P8fjqpUBU KimX9fIl1B/oYthWSgA/ZwH7DYqw0eU7CVA2j/OfLYGfjY+qiju2M4NKxWv50cbdvWzH w6tHaU3rPNXKRRVGEaIoKy4xnBpOKbXhPWTkogl61JqLa2eelGVtI4vJrnRKzH1OQ5Vx LVgeWoxlgcZdIEkvUwKvY0ZCD19wWno5LUtB8Muez9NFsRib5MpxVrVkqncozrJn1nJp QXVg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si3800714edn.240.2020.05.21.17.38.11; Thu, 21 May 2020 17:38:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726785AbgEVAfF (ORCPT + 99 others); Thu, 21 May 2020 20:35:05 -0400 Received: from mga14.intel.com ([192.55.52.115]:55683 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbgEVAfE (ORCPT ); Thu, 21 May 2020 20:35:04 -0400 IronPort-SDR: 5YRl7PJrI5Wm5c4uxsyNQT2dq2h+Rqg9yLddL/MNAOcO1uZeQExGWZSMLov+7iwSJfRW9Q2QBx +TY+7o/1QL8g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2020 17:35:04 -0700 IronPort-SDR: SFyqf/fHJwtvhvCzbPkQkIHNPYkrrIKp4ZuzqpTxwdOW+5O5VCFZvsusR+MwDLtmxv5ORgmK1/ +EBhhmiKC+5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,419,1583222400"; d="scan'208";a="300961665" Received: from nsalivat-mobl.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.98.52]) by orsmga008.jf.intel.com with ESMTP; 21 May 2020 17:35:04 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 03/10] mesh: Remove agent when freeing node's dynamic resources Date: Thu, 21 May 2020 17:34:54 -0700 Message-Id: <20200522003501.106165-4-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200522003501.106165-1-inga.stotland@intel.com> References: <20200522003501.106165-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This adds clean up of node's agent instance when node's dynamic resources are freed. --- mesh/node.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mesh/node.c b/mesh/node.c index d5e07ce7f..8ad77639e 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -333,6 +333,7 @@ static void free_node_resources(void *data) /* Free dynamic resources */ free_node_dbus_resources(node); l_queue_destroy(node->elements, element_free); + mesh_agent_remove(node->agent); mesh_config_release(node->cfg); mesh_net_free(node->net); l_free(node->storage_dir); -- 2.26.2