Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1051160pxa; Wed, 12 Aug 2020 22:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH3OsttOx5P8qLAFBP9fVMT8CoCA5D7HJkVBGd6A3SF7ExP5OOjgJL5ed4svCOxiv51tIk X-Received: by 2002:a17:906:3b8d:: with SMTP id u13mr782650ejf.383.1597294965688; Wed, 12 Aug 2020 22:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597294965; cv=none; d=google.com; s=arc-20160816; b=NZdlLiTw7Zs7fMQfxv504Wl1KK4hmjYhkVHUJk/MzvJgb8h3NN9eex3KKV3wbZ5uwl nQUaAcNTrcHgPqmYBac0sUKionOT/URa+S/tDLVSdhlLfQPdEstwvU5drvQ9eo2gwqfq 2SVOlP3YqFTampGpgmBphw9KP83nFnHTLbhX0LB5C5KQtDXeikdoGUtyNKT+Lu7SRkys PX439xyD0JnqrWvd2v1RrLfcvr1lCslWiN+cnYmI8q5fOoDleN8p1TnhPFakzE0VgVUy CT+kbfeViizOfPv3VnTc9YjpQo4M+6NwWcZQihL5I9Oe6UROaTkSbEalAy6detJUynhC D9oA== 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 :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=gQCgpRQQdhnE3O4CL7Y7ngdi46zXcgm4tfrEO1D+kT4=; b=LJJCppFkiJieVtD2gl2IWKM0v0nSWPItAUPv922YzdHhRjzLtt9codQnevuKdJZzW5 QL24TtkLaDK/kkn6C2c4VK/u8Ba8Q5k+ak4AuAwN9fPFTfPzB872akandPKe9tfVvfbN OgXqAvOQ/kXKXVjtHxiZ9RC3FQ2n1NnaI/a4/qSIiIvW21ffjjOmC0n29z9ieYmTZYmW IGv4S9UDxgFTeRCv9PUMHebODcgnAQIgavs69H9TmD0Up0oR3zRfCSFrjTyX2XVoYDW6 +9bBBfUNevLR2WwqCd6A8KZa3ivPyTfM3Ki8whk6kNi28bmZPigmvMxVupAqSWIgjG+v 4evg== 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 s9si2772577edh.16.2020.08.12.22.01.56; Wed, 12 Aug 2020 22:02:45 -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 S1725915AbgHMFB4 (ORCPT + 99 others); Thu, 13 Aug 2020 01:01:56 -0400 Received: from mga01.intel.com ([192.55.52.88]:34463 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbgHMFBz (ORCPT ); Thu, 13 Aug 2020 01:01:55 -0400 IronPort-SDR: depHhk6SWEhwQJ9+QCCZXPZSwNCY+0GUaPzympX0utZpRAXl7x7CSwSd4EEwRLDNYzQEVW7+l8 yg6y220AqlUQ== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="172205220" X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="172205220" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 22:01:55 -0700 IronPort-SDR: l5Qlt8gjeMgg64IdpM21NWlJXlb8m9q0eaKN+OF4Zf6eW3/5erXHPu7oK95h/C0tIsIvYTwA7C L59tHssq1RJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="399054397" Received: from bnichola-mobl1.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.255.230.96]) by fmsmga001.fm.intel.com with ESMTP; 12 Aug 2020 22:01:55 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] mesh: Don't add config server when loading from storage Date: Wed, 12 Aug 2020 22:01:50 -0700 Message-Id: <20200813050150.135751-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 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 Adding a sonfig server model when loading from storage is unnecessary, since the daemon-generated stored configuration always contains config server model. This also fixes a memory leak caused by bad parameters passed to mesh_model_add() --- mesh/node.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mesh/node.c b/mesh/node.c index 4b70587ae..1eeffeb8b 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -353,9 +353,6 @@ static bool add_elements_from_storage(struct mesh_node *node, if (!add_element_from_storage(node, entry->data)) return false; - /* Add configuration server model on the primary element */ - mesh_model_add(node, PRIMARY_ELE_IDX, CONFIG_SRV_MODEL, NULL); - return true; } -- 2.26.2