projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76ed83f
)
ofproto-dpif: Fix null pointer dereference in get_ofp_port().
author
Ben Pfaff
<blp@nicira.com>
Fri, 13 May 2011 23:50:20 +0000
(16:50 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 13 May 2011 23:50:20 +0000
(16:50 -0700)
ofproto/ofproto-dpif.c
patch
|
blob
|
history
diff --git
a/ofproto/ofproto-dpif.c
b/ofproto/ofproto-dpif.c
index 93acd429bbdadd6663b0a1e8fb46ad31892e6fd0..b7194930d0a0e17bbf98605706f7a1b363dec053 100644
(file)
--- a/
ofproto/ofproto-dpif.c
+++ b/
ofproto/ofproto-dpif.c
@@
-1353,7
+1353,8
@@
is_mirror_output_bundle(struct ofproto *ofproto_, void *aux)
static struct ofport_dpif *
get_ofp_port(struct ofproto_dpif *ofproto, uint16_t ofp_port)
{
- return ofport_dpif_cast(ofproto_get_port(&ofproto->up, ofp_port));
+ struct ofport *ofport = ofproto_get_port(&ofproto->up, ofp_port);
+ return ofport ? ofport_dpif_cast(ofport) : NULL;
}
static struct ofport_dpif *