From 2c2228b4398b9f2264efba6a9e69f707909a48c4 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 13 Sep 2013 20:23:14 +0200 Subject: Remove a memory leak This happened each time it was needed to look up the 'ifindex' of an interface via the get_interfaces_info() API. Signed-off-by: David Sommerseth --- python-ethtool/etherinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/python-ethtool/etherinfo.c b/python-ethtool/etherinfo.c index c8bbb0f..8d56279 100644 --- a/python-ethtool/etherinfo.c +++ b/python-ethtool/etherinfo.c @@ -234,6 +234,7 @@ int get_etherinfo(struct etherinfo_obj_data *data, nlQuery query) if( ethinf->index < 0 ) { return 0; } + rtnl_link_put(link); nl_cache_free(link_cache); } -- cgit