summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2013-09-13 20:23:14 +0200
committerDavid Sommerseth <davids@redhat.com>2013-09-13 20:23:14 +0200
commit2c2228b4398b9f2264efba6a9e69f707909a48c4 (patch)
tree7e6e66b38d8d7a71cb265a2e8112c21a9ac258ec
parentd3f5fd74bdb903c032eca8ab4e391172d3162c76 (diff)
downloadpython-ethtool-2c2228b4398b9f2264efba6a9e69f707909a48c4.tar.gz
python-ethtool-2c2228b4398b9f2264efba6a9e69f707909a48c4.tar.xz
python-ethtool-2c2228b4398b9f2264efba6a9e69f707909a48c4.zip
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 <davids@redhat.com>
-rw-r--r--python-ethtool/etherinfo.c1
1 files changed, 1 insertions, 0 deletions
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);
}