[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1371038398-15934-1-git-send-email-yuvalmin@broadcom.com>
Date: Wed, 12 Jun 2013 14:59:58 +0300
From: "Yuval Mintz" <yuvalmin@...adcom.com>
To: bhutchings@...arflare.com
cc: netdev@...r.kernel.org, "Yuval Mintz" <yuvalmin@...adcom.com>
Subject: [PATCH] Ethtool: Free memory leak in do_sprivflags()
cmdline is allocated for usage in parse_generic_cmdline(), but is not
released after its final usage.
Signed-off-by: Yuval Mintz <yuvalmin@...adcom.com>
---
ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ethtool.c b/ethtool.c
index 8cc10b5..b80494d 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3521,6 +3521,7 @@ static int do_sprivflags(struct cmd_context *ctx)
cmdline[i].seen_val = &seen_flags;
}
parse_generic_cmdline(ctx, &any_changed, cmdline, strings->len);
+ free(cmdline);
flags.cmd = ETHTOOL_GPFLAGS;
if (send_ioctl(ctx, &flags)) {
--
1.8.1.227.g44fe835
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists