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>
Fri, 29 Apr 2011 17:47:10 +0000 (10:47 -0700)
commit6f04e94a264edae76aa2bb44a9019e19b29d47a1
treea2d26b85dbdbb8886ffa036f80f62c911e1e70bc
parentebca7787e50327716e2c2ea4a7cc2656fd4e9fd5
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