Coverity issues: 1363120, 1363121 Fixes: 6042804cf6ec ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES")
Signed-off-by: John W. Linville <linvi...@tuxdriver.com> --- ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethtool.c b/ethtool.c index 0885a61097ad..09486615a5bb 100644 --- a/ethtool.c +++ b/ethtool.c @@ -2233,10 +2233,13 @@ static int do_gfeatures(struct cmd_context *ctx) features = get_features(ctx, defs); if (!features) { fprintf(stdout, "no feature info available\n"); + free(defs); return 1; } dump_features(defs, features, NULL); + free(features); + free(defs); return 0; } -- 2.7.4