diff mbox

[5/7] ethtool: fix leakage of efeatures resources in do_sfeatures

Message ID 1475265381-28937-6-git-send-email-linville@tuxdriver.com
State Accepted, archived
Delegated to: John Linville
Headers show

Commit Message

John W. Linville Sept. 30, 2016, 7:56 p.m. UTC
Coverity issue: 1363122
Fixes: 6042804cf6ecc ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES")

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 ethtool.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/ethtool.c b/ethtool.c
index 2fd3393ca5f6..840a5da157a9 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -2430,6 +2430,8 @@  static int do_sfeatures(struct cmd_context *ctx)
 
 err:
 	free(defs);
+	if (efeatures)
+		free(efeatures);
 	return rc;
 }