[ethtool] 11/20: ethtool: plug resource leaks of defs and features in do_gfeatures
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Oct 17 04:09:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository ethtool.
commit 210ffb114dc69bf9f9c6b9456c9f4b50dec9ae7c
Author: John W. Linville <linville at tuxdriver.com>
Date: Thu Sep 29 15:26:55 2016 -0400
ethtool: plug resource leaks of defs and features in do_gfeatures
Coverity issues: 1363120, 1363121
Fixes: 6042804cf6ec ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES")
Signed-off-by: John W. Linville <linville at tuxdriver.com>
Reviewed-by: Greg Rose <grose at lightfleet.com>
---
ethtool.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ethtool.c b/ethtool.c
index 7ce5667..78bc814 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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/ethtool.git
More information about the Kernel-svn-changes
mailing list