Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1402805pxj; Fri, 21 May 2021 13:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR+d0zyQzfcfYRjwh6w9OA1SyTDce3vSwuwgt0ZnKY9IMXs/5ffNTqGbKJxZ67bYc04Gtn X-Received: by 2002:a05:6602:21ca:: with SMTP id c10mr705782ioc.10.1621628617706; Fri, 21 May 2021 13:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628617; cv=none; d=google.com; s=arc-20160816; b=aKlcYD+2eGIiPqxDmQFzFn+atGFxnWbay5RqfWgItwhv9p094RKiLE7103X6BMVDTA WtMn0uj/d7q/DPRdG9Cmrvq0k3paXsjKlNL+vk6zLWaGU1cfyflg5LVAnrQEP4hvhls/ D/Yo8vSc7nov+XGLFakCJMv9CeHablvsa9RDu0j30bFfa/CG68C+rvTighJltEZTgqMw 9+V64za1RQpNtYFdXFVvIQkIk/mRZZoWR85Leez61ryy560faCB+Uc77Y0KyzvaK6npv hIcUt3XUQFqndYY+0veMQ1B01Bfdc65KFBfo7g4ZxQBA3PT3oSKtL2tbfAkeKyyVayyL OhQA== 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 :message-id:date:subject:to:from:dkim-signature; bh=OrE+aYLfm13yOMdJc6r05vZKjSQx3iCKFks6PE7gp0g=; b=01WSN653314ADt/StERFYdTjM440q/6oTHqmzl0Ln6SLSC0tfkcz7szJ+x60Hdm0qZ tjDV/Pa/pQkBjBADsaPPFiWLyyhVi0Xyu6L3Ri2hRKE54zo8mTVMyOR0GuIjdDRlA81S npWVlBIKi9DHzAIrbiOBccjXT4v9kc1VwbIbhsTpnjZRw+zaCwVGUV2uyH2whpDaCjrB Y/i11lTEiZUkq4IWg+EC+vTTgOo++OmP4yjPJaOLS858ncgWWNTg6b8yNSwh+Eq1jTtk pAAZI5JELsF/VArYSD9VMxo81QXiTrx18cFNf8Wbg/HW6XoO5Xw7jaOy9nSkPxrknVHg X28A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EDIY7DwK; 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 g9si7139475ila.105.2021.05.21.13.23.14; Fri, 21 May 2021 13:23:37 -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=EDIY7DwK; 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 S235052AbhEURFe (ORCPT + 99 others); Fri, 21 May 2021 13:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233990AbhEURFe (ORCPT ); Fri, 21 May 2021 13:05:34 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B251C061574 for ; Fri, 21 May 2021 10:04:10 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id ot16so9354287pjb.3 for ; Fri, 21 May 2021 10:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=OrE+aYLfm13yOMdJc6r05vZKjSQx3iCKFks6PE7gp0g=; b=EDIY7DwKRDbFrFHqQ0Qx/iDq/hSivIqD+TC00NzcF+EgiIUkHHASMw5nw1Mdaf5aQH 4Bau6SqnNTcnU8Ha6kR3GUXR/p+7bz6czkjwaMUQVd36x00+Lc1nNwzJ1y9dzwlEx1u3 Nt6/v/Rf7wdK4CmL/jftyCr5Xa1TglBDhjrQ2XxCotYRr/VWPPdXrcCsPGEG+vQwQU7z XIHfNUTyyeC509iLOg6AqhWNdlYfz0MCb8dYUKDQI17EsfLJ4Ywi0E3lGmUsD39/edz6 IuqZwuUNeZ5t94O73xVa/nstRzaqVKWZrH5Q4dHjlN+g6psWiV/05anAQ6Ik9xuNd4dV 2sag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=OrE+aYLfm13yOMdJc6r05vZKjSQx3iCKFks6PE7gp0g=; b=QJKJhdhBgx5DaotXseRBJoO3+6WGwxU5BMnB1gU8iPqZykuD57LMeNAwmn3cfv0r17 yVEDw6vcjXr5QjwJVKagfwlky6YsdkLxNJegQtfzg6vlycHWn0TYJ4WlCPSyeeh/RWuG pyaHgj6Y7CBlODVG1LYxT06mmCO7nftqo01LlIbfde+xd7oiDXEKPntp6TKJDkfi7s8b W3JK4KdAfcEBr1aZcvZKrnY4BXtE+fiSJc+o0RROR5YAP6UEhzF5zz5lXyuHmR4dsdsh nWUqXfZxi9GY6gnjWo7+IRDaOYHVrmQWe2zwrV/g0l/o2J3SfGiTc5NMEuNi7iBamd4Y +bHQ== X-Gm-Message-State: AOAM532FX/cr6ZkBC0EHOcWAAtIQNT/kpIiUMAxlllS1sP7D6fy2iefz PoWMZT4Gk8KD/dql7mJsP9f2B82bKQT/Hg== X-Received: by 2002:a17:902:c406:b029:ef:7ba2:f308 with SMTP id k6-20020a170902c406b02900ef7ba2f308mr13290548plk.9.1621616649686; Fri, 21 May 2021 10:04:09 -0700 (PDT) Received: from han1-mobl3.intel.com ([2601:1c0:6a01:d830::e853]) by smtp.gmail.com with ESMTPSA id y14sm9056094pjr.51.2021.05.21.10.04.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 10:04:09 -0700 (PDT) From: Tedd Ho-Jeong An To: linux-bluetooth@vger.kernel.org Subject: [BlueZ PATCH] src/main: Fix double free str Date: Fri, 21 May 2021 10:04:07 -0700 Message-Id: <20210521170407.180152-1-hj.tedd.an@gmail.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Tedd Ho-Jeong An This patch fixes the double free the string. The string variable is always freed within its if statement so no need to free it again in the end. --- src/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.c b/src/main.c index ed19e3e28..57db9c134 100644 --- a/src/main.c +++ b/src/main.c @@ -804,7 +804,6 @@ static void parse_config(GKeyFile *config) parse_br_config(config); parse_le_config(config); - g_free(str); } static void init_defaults(void) -- 2.26.3