From patchwork Wed Jun 29 05:02:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 641828 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rfVsy3w8mz9sf9 for ; Wed, 29 Jun 2016 15:02:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=L12BfyYO; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 735F810870; Tue, 28 Jun 2016 22:02:44 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 55B8310777 for ; Tue, 28 Jun 2016 22:02:43 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id B8F6D1E04BD for ; Tue, 28 Jun 2016 23:02:42 -0600 (MDT) X-ASG-Debug-ID: 1467176562-09eadd73990e900001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id kQr2ypU2QejAmRXp (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 28 Jun 2016 23:02:42 -0600 (MDT) X-Barracuda-Envelope-From: u9012063@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pa0-f66.google.com) (209.85.220.66) by mx1-pf2.cudamail.com with ESMTPS (AES128-SHA encrypted); 29 Jun 2016 05:02:42 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at _netblocks.google.com designates 209.85.220.66 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.220.66 X-Barracuda-RBL-IP: 209.85.220.66 Received: by mail-pa0-f66.google.com with SMTP id ts6so3438840pac.0 for ; Tue, 28 Jun 2016 22:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=/P+/xTolW+Shn6lbMH9GmJrYycRXFtSnjJxKmh/37hE=; b=L12BfyYOeMLLVUYLs+5Qw9M+c0su+bLW2sRxCe8BjxZG0mQS/fGij2lVVnt1EzT/mZ M7e9d3w+Aw+CdlPM+OkpWILEbV0xtQyZdMb6COmsjL72yHGgOazDwfyjL6+ug97hXVvy Fm6e6dAHrXlKmMRjeUlP575FDZSilAdwgkCLusNWLBy60VZWhy+cqZ+31lebNfVEq1gP ch4v2yl0a0t3ED1RMlwouWPbj9gkZxZk3AK5CecrtvKWgHsJyQ7Iob9roiOv/S0Eo1Rx zFtSn1bSDz0WdaPO+V9F4ZtUFdu2oEd6iwE0EFcv5OegN/1iKWayl9v9/NT9gVY9ny85 cOSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=/P+/xTolW+Shn6lbMH9GmJrYycRXFtSnjJxKmh/37hE=; b=hXllKT6Chi2DZsxPxlNcFbSi/wDiTBmoz3MHPIMgLq4ITm51deGCJ/AmRtnl0WNuQR fza8CUeKpXOEN2WCDm7jIZmxPvulfvv0Hi2OPpxO8ziQwGYfGezXgqbqTXhPFJFZtuLf 2KVt4xRP3W2PjqYOOa1TwfPkhah0rdUsKHWuVEAtAIr1r0I3ipv1zfpxcPRtPBK7UkVq COMpszDYt+hZNSp1Hf5mcUQ3cb3UApc91UftmfizyZAy32uzpswVoYXEHFYBiBiX0MHu 3omop6KBzp0JUS86+Wfp5XX2IfzpSGZl0bRdRxqwgzZCVo1KSLHyJxRh+l8feeTckxnU sCww== X-Gm-Message-State: ALyK8tKvYe/8YLlCZ1Ea1Eo7bSAdGmqZnmSuLOOb08S5zsHF6FRrzctR6/D7CWgOYkfsTQ== X-Received: by 10.66.165.145 with SMTP id yy17mr8362113pab.116.1467176561351; Tue, 28 Jun 2016 22:02:41 -0700 (PDT) Received: from vm-dev.localdomain ([76.126.157.223]) by smtp.gmail.com with ESMTPSA id y70sm1857417pff.25.2016.06.28.22.02.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 22:02:40 -0700 (PDT) X-CudaMail-Envelope-Sender: u9012063@gmail.com From: William Tu To: dev@openvswitch.org X-CudaMail-MID: CM-E2-627099885 X-CudaMail-DTE: 062816 X-CudaMail-Originating-IP: 209.85.220.66 Date: Tue, 28 Jun 2016 22:02:22 -0700 X-ASG-Orig-Subj: [##CM-E2-627099885##][PATCH 1/7] bridge: Fix possible null pointer dereference reported by clang. Message-Id: <1467176548-40488-2-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467176548-40488-1-git-send-email-u9012063@gmail.com> References: <1467176548-40488-1-git-send-email-u9012063@gmail.com> X-GBUdb-Analysis: 0, 209.85.220.66, Ugly c=0.327499 p=-0.25 Source Normal X-MessageSniffer-Rules: 0-0-0-4107-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1467176562 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, MAILTO_TO_SPAM_ADDR, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.30853 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 1/7] bridge: Fix possible null pointer dereference reported by clang. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: William Tu --- vswitchd/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 8ebfc66..7244e11 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1999,7 +1999,7 @@ find_local_hw_addr(const struct bridge *br, struct eth_addr *ea, /* The local port doesn't count (since we're trying to choose its * MAC address anyway). */ - if (iface->ofp_port == OFPP_LOCAL) { + if (iface && iface->ofp_port == OFPP_LOCAL) { continue; }