datapath: Avoid freeing wild pointer in corner case.
authorBen Pfaff <blp@nicira.com>
Thu, 28 Apr 2011 23:34:56 +0000 (16:34 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 17 May 2011 20:27:30 +0000 (13:27 -0700)
commit3cfbc234e7591aa484d83a620eb2031be10edccb
tree408a4405c208e8301070ca5e1cf693bd4c2820da
parent62732fbf18480ae095e540f3d536cbe017731f20
datapath: Avoid freeing wild pointer in corner case.

In odp_flow_cmd_new_or_set(), if flow_actions_alloc() fails in the "new
flow" case, then flow_put() will kfree() the new flow's 'sf_acts' pointer,
but nothing has initialized that pointer.  Initialize the pointer to NULL
to avoid the problem.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/flow.c