fix memory leaks in do_sfeatures()

Memory blocks referenced by new_state and old_state are never freed.
For efeatures there is no need to check pointer as free() can be called
with NULL parameter.

Fixes: 6042804cf6ec ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES")
Cc: Michal Kubecek <>
Signed-off-by: Ivan Vecera <>
Signed-off-by: Michal Kubecek <>
1 file changed