[ethtool PATCH v4 03/11] ethtool.c: fix dump_regs heap corruption

2016-03-11 Thread David Decotigny
From: David Decotigny The 'regs' pointer is owned by do_gregs(), but updated internally inside dump_regs() without propagating it back to do_gregs(): later free(regs) in do_gregs() reclaims the wrong area. This commit moves the realloc() inside do_gregs(). Signed-off-by: David Decotigny --- e

[ethtool PATCH v4 03/11] ethtool.c: fix dump_regs heap corruption

2016-03-07 Thread David Decotigny
From: David Decotigny The 'regs' pointer is owned by do_gregs(), but updated internally inside dump_regs() without propagating it back to do_gregs(): later free(regs) in do_gregs() reclaims the wrong area. This commit moves the realloc() inside do_gregs(). Signed-off-by: David Decotigny --- e