[ovs-dev] [PATCH v3] bridge: Fix use of wild pointer in iface_do_create().
Justin Pettit
jpettit at nicira.com
Fri May 17 05:48:56 UTC 2013
Looks good.
--Justin
On May 16, 2013, at 10:45 PM, Ben Pfaff <blp at nicira.com> wrote:
> 'netdev' was not initialized at this point in the function, so the cleanup
> at the error label referenced a wild pointer.
>
> Introduced in commit 94a538422d4b (netdev: Prevent using reserved names).
>
> CC: Alex Wang <alexw at nicira.com>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> v1->v2: Fix Alex's email address.
> v2->v3: Fix bug I introduced noted by Justin.
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 28e306e..e10036c 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -1415,7 +1415,7 @@ iface_do_create(const struct bridge *br,
> {
> const struct ovsrec_interface *iface_cfg = if_cfg->cfg;
> const struct ovsrec_port *port_cfg = if_cfg->parent;
> - struct netdev *netdev;
> + struct netdev *netdev = NULL;
> int error;
>
> if (netdev_is_reserved_name(iface_cfg->name)) {
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list