Skip to content

Commit 2c2228b

Browse files
author
David Sommerseth
committed
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>
1 parent d3f5fd7 commit 2c2228b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python-ethtool/etherinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ int get_etherinfo(struct etherinfo_obj_data *data, nlQuery query)
234234
if( ethinf->index < 0 ) {
235235
return 0;
236236
}
237+
rtnl_link_put(link);
237238
nl_cache_free(link_cache);
238239
}
239240

0 commit comments

Comments
 (0)