From patchwork Tue Feb 16 13:23:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Otcheretianski, Andrei" X-Patchwork-Id: 1440906 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ewEqThl3; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dg1td1Yrzz9sVR for ; Wed, 17 Feb 2021 00:25:29 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Km2bpIVHq434mGYXRlPXwALvHgq9JUC0L7C8JQ4XYcc=; b=ewEqThl3RyfbEJ+tTKNp85W9yN qeTzr/IGdk0xGvUao/KzWpxK1HwGbEoMNovYIx46AkQ97UjDba/lT+3USpJqkt6Qk7nH1XbjEBHg6 Z7H8ZBxxrcz0bbGco+f55HThaJUh5maU5oByUBqoKE2tOCUE+7K8hLzjaoZHBCK6oK58WqBWJmDge jNsvw5qOLaxFq86xg1cR/SySW33NoCUA5RfxGyo6LaUdItwgAAZAYRdlFwodDSv4k6P3BZE3jrgQY l5aEea93ZJIrnP2oU+YyG4Eansojw1Mksbcq/nN+ods2w8R4R7KMgfzbCBqfrg/zp6DmZQlJ0ZeGl cYnzmhxw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC0LB-0005u8-6N; Tue, 16 Feb 2021 13:24:33 +0000 Received: from mga03.intel.com ([134.134.136.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC0L7-0005t8-Q6 for hostap@lists.infradead.org; Tue, 16 Feb 2021 13:24:31 +0000 IronPort-SDR: VO6ptNC/QDVb5L4DW7g4qKlzGysp7BghdWv9tvN9LlEewta66Pr9bJmpluZ3hjtSicydA4VtfB 62geVLs/VXAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="182955397" X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="182955397" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2021 05:24:21 -0800 IronPort-SDR: A4kIJIVq/sq9GF2ZL37bHkuIIIw2LJyI7ql1sqKBNmfXTMy0nBmLqo1h+8CyLy965mebSev2Hb Z0CCVAXvFvBw== X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="399500563" Received: from rrezvanx-mobl.ger.corp.intel.com (HELO aotchere-desk.ger.corp.intel.com) ([10.214.238.88]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2021 05:24:20 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] wpa_supplicant: Fix potential memleak Date: Tue, 16 Feb 2021 15:23:56 +0200 Message-Id: <20210216132357.4588-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_082430_030677_42D85DB5 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [134.134.136.65 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrei Otcheretianski Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fix a memory leak on error path. Signed-off-by: Andrei Otcheretianski --- wpa_supplicant/interworking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 1ff142a8d4..5db473cf73 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -2793,6 +2793,7 @@ int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, int freq, wpa_printf(MSG_WARNING, "ANQP: Cannot send MBO query to unknown BSS " MACSTR, MAC2STR(dst)); + wpabuf_free(extra_buf); return -1; }