Ethtool: Free memory leak in do_sprivflags()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- ethtool.c | 1 + 1 file changed, 1 insertion(+)
ethtool.c +1 -0
@@ -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)) {
Signature · 1 line
1.8.1.227.g44fe835
Ben Hutchings
AppliedQuoted 4 lines · Yuval Mintz
cmdline is allocated for usage in
parse_generic_cmdline(), but is not released after its final usage.Signed-off-by Yuval Mintz <[email protected]>
Applied.
Ben.
Quoted 16 lines
--- ethtool.c | 1 + 1 file changed, 1 insertion(+)ethtool.c +1
-0@@ -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)) {
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.