X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev.c;h=bed480f71159e3f734952b37fe7aec5da8d1e9ae;hb=ef5925df6af03cf47a4931539016715f6ac3f661;hp=9a92a5f9724f72a5f3822f8876e8ecde0a0223ea;hpb=13063c3b38aeaadf4802afe2b119198c2db41866;p=openvswitch diff --git a/lib/netdev.c b/lib/netdev.c index 9a92a5f9..bed480f7 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; }