This commit fixes memory leaks in dp_execute_cb() in two cases:
- when the output port cannot be found
- when the recirculation depth is exceeded
Reported-by: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
p = dp_netdev_lookup_port(aux->dp, u32_to_odp(nl_attr_get_u32(a)));
if (p) {
netdev_send(p->netdev, packet, may_steal);
+ } else if (may_steal) {
+ ofpbuf_delete(packet);
}
+
break;
case OVS_ACTION_ATTR_USERSPACE: {
break;
} else {
+ if (may_steal) {
+ ofpbuf_delete(packet);
+ }
VLOG_WARN("Packet dropped. Max recirculation depth exceeded.");
}
break;