From patchwork Thu Jan 24 12:30:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stone Piao X-Patchwork-Id: 215342 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 57E8A2C009E for ; Thu, 24 Jan 2013 23:29:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 47A509C192; Thu, 24 Jan 2013 07:29:45 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DPENMy9009P9; Thu, 24 Jan 2013 07:29:45 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 7F8B59C182; Thu, 24 Jan 2013 07:29:40 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 00BD29C182 for ; Thu, 24 Jan 2013 07:29:39 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k5Zxssyb6oHN for ; Thu, 24 Jan 2013 07:29:35 -0500 (EST) Received: from na3sys009aog115.obsmtp.com (na3sys009aog115.obsmtp.com [74.125.149.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 0A24C9C15B for ; Thu, 24 Jan 2013 07:29:34 -0500 (EST) Received: from SC-OWA01.marvell.com ([199.233.58.136]) (using TLSv1) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKUQEpLnHz3lEualmFXS4Um0kafFWPJKur@postini.com; Thu, 24 Jan 2013 04:29:35 PST Received: from SC-VEXCH4.marvell.com ([0000:0000:0000:0000:0000:0000:0.0.0.1]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Thu, 24 Jan 2013 04:29:34 -0800 From: Stone Piao To: "hostap@lists.shmoo.com" Date: Thu, 24 Jan 2013 04:30:03 -0800 Subject: [PATCH] Avoid to update probe response IE when IE pointer is NULL Thread-Topic: [PATCH] Avoid to update probe response IE when IE pointer is NULL Thread-Index: Ac36Lois0rprnM0mTCmYkKUjCK6GgA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From fff30632be8c6961d8f8bceab7153707a22bbf96 Mon Sep 17 00:00:00 2001 From: Stone Piao Date: Thu, 24 Jan 2013 15:20:46 -0500 Subject: [PATCH] Avoid to update probe response IE when IE pointer is NULL Signed-off-by: Stone Piao --- wpa_supplicant/p2p_supplicant.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 0a09b00..c1ac6fa 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4153,8 +4153,10 @@ static void wpas_p2p_ie_update(void *ctx, struct wpabuf *beacon_ies, wpabuf_free(hapd->p2p_beacon_ie); hapd->p2p_beacon_ie = beacon_ies; } - wpabuf_free(hapd->p2p_probe_resp_ie); - hapd->p2p_probe_resp_ie = proberesp_ies; + if (proberesp_ies) { + wpabuf_free(hapd->p2p_probe_resp_ie); + hapd->p2p_probe_resp_ie = proberesp_ies; + } } else { wpabuf_free(beacon_ies); wpabuf_free(proberesp_ies);