All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: netdev@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 5/7] ethtool: fix leakage of efeatures resources in do_sfeatures
Date: Fri, 30 Sep 2016 15:56:19 -0400	[thread overview]
Message-ID: <1475265381-28937-6-git-send-email-linville@tuxdriver.com> (raw)
In-Reply-To: <1475265381-28937-1-git-send-email-linville@tuxdriver.com>

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 --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;
 }
 
-- 
2.7.4

  parent reply	other threads:[~2016-09-30 20:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 19:56 [PATCH 0/7] ethtool: misc fixes for Coverity issues John W. Linville
2016-09-30 19:56 ` [PATCH 1/7] ethtool: avoid NULL pointer dereference in do_permaddr John W. Linville
2016-09-30 19:56 ` [PATCH 2/7] ethtool: avoid resource leak of strings in do_gprivflags John W. Linville
2016-10-03 17:54   ` Jarod Wilson
2016-10-04 14:02     ` John W. Linville
2016-10-04 14:05   ` [PATCH v2 " John W. Linville
2016-09-30 19:56 ` [PATCH 3/7] ethtool: plug resource leaks of defs and features in do_gfeatures John W. Linville
2016-09-30 19:56 ` [PATCH 4/7] ethtool: fix leakage of defs resources in do_sfeatures John W. Linville
2016-09-30 19:56 ` John W. Linville [this message]
2016-09-30 19:56 ` [PATCH 6/7] ethtool: fix leakage of strings resources in do_sprivflags John W. Linville
2016-09-30 19:56 ` [PATCH 7/7] ethtool: fix leakage of strings resources in get_feature_defs John W. Linville
2016-09-30 20:26 ` [PATCH 0/7] ethtool: misc fixes for Coverity issues Greg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475265381-28937-6-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.