2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpif-netdev: Fix leaked port, port->rxq, port->type in error path

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
[blp@nicira.com added free of port->type]
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Thomas Graf
2014-08-26 18:36:08 +02:00
committed by Ben Pfaff
parent 7866907377
commit 16bea12c92

View File

@@ -669,6 +669,9 @@ do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
VLOG_ERR("%s: cannot receive packets on this network device (%s)",
devname, ovs_strerror(errno));
netdev_close(netdev);
free(port->type);
free(port->rxq);
free(port);
return error;
}
}
@@ -679,6 +682,7 @@ do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
netdev_rxq_close(port->rxq[i]);
}
netdev_close(netdev);
free(port->type);
free(port->rxq);
free(port);
return error;