[ovs-dev] [PATCH 1/2] netdev-linux: Fix memory leak in get_stats_via_netlink().
Justin Pettit
jpettit at nicira.com
Mon Sep 21 23:09:19 UTC 2009
Looks good.
--Justin
On Sep 21, 2009, at 2:43 PM, Ben Pfaff wrote:
> Bug #1817.
> ---
> lib/netdev.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/lib/netdev.c b/lib/netdev.c
> index 9a92a5f..bed480f 100644
> --- a/lib/netdev.c
> +++ b/lib/netdev.c
> @@ -1058,6 +1058,7 @@ get_stats_via_netlink(int ifindex, struct
> netdev_stats *stats)
>
> if (!attrs[IFLA_STATS]) {
> VLOG_WARN_RL(&rl, "RTM_GETLINK reply lacks stats");
> + ofpbuf_delete(reply);
> return EPROTO;
> }
>
> @@ -1084,6 +1085,8 @@ get_stats_via_netlink(int ifindex, struct
> netdev_stats *stats)
> stats->tx_heartbeat_errors = rtnl_stats->tx_heartbeat_errors;
> stats->tx_window_errors = rtnl_stats->tx_window_errors;
>
> + ofpbuf_delete(reply);
> +
> return 0;
> }
>
> --
> 1.6.3.3
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list