ofproto-dpif: Fix pointer arithmetic on null pointer.
authorBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 23:01:05 +0000 (16:01 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 23:01:05 +0000 (16:01 -0700)
commit79feb7dfc714780ba86de73d42fe366e45e22b05
tree8f61c668ea2a05b9521d0f1b36508e46e8570be3
parent876b0e1c74a43c4edf261e3ca571a440d01b0b4c
ofproto-dpif: Fix pointer arithmetic on null pointer.

rule_dpif_lookup() can return a null pointer as 'rule' so we shouldn't
try to calculate '&rule->up' before it's been found to be nonnull.

This doesn't appear to fix a real bug because 'up' is the first member
of 'rule' so when rule is NULL then &rule->up is also NULL.

Reported-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif.c