Commit
91d6cd12 (ofproto-dpif: Move send_packet() to
ofproto-dpif-xlate module.) introduced a bug that frees the "struct
ofpbuf" in 'xout' when the struct is not initialized. This commit
fixes the bug.
Reported-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs_rwlock_rdlock(&xlate_rwlock);
xport = xport_lookup(ofport);
if (!xport) {
- error = EINVAL;
ovs_rwlock_unlock(&xlate_rwlock);
- goto out;
+ return EINVAL;
}
odp_flow_key_from_flow(&key, &flow, ofp_port_to_odp_port(xport->xbridge, OFPP_LOCAL));
xout.odp_actions.data, xout.odp_actions.size,
packet, (xout.slow & SLOW_ACTION) != 0);
ovs_rwlock_unlock(&xlate_rwlock);
-
-out:
xlate_out_uninit(&xout);
return error;
}