From: Ben Pfaff Date: Mon, 11 Jan 2010 23:21:33 +0000 (-0800) Subject: vswitch: Fix null pointer dereference in iface_is_internal(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c30e5d117bd45afaf0a107509b2c92b9a797380;p=openvswitch vswitch: Fix null pointer dereference in iface_is_internal(). Reported by Henrik Amren. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index ea8161ff..0a8a9e09 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2009 Nicira Networks +/* Copyright (c) 2008, 2009, 2010 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3427,7 +3427,7 @@ iface_is_internal(const struct bridge *br, const char *if_name) } port = port_lookup(br, if_name); - if (port->n_ifaces > 1 && port->cfg->bond_fake_iface) { + if (port && port->n_ifaces > 1 && port->cfg->bond_fake_iface) { return true; } return false;