commit | c10e6cf85e7d984a156052daeedaf20a1f38824f | [log] [tgz] |
---|---|---|
author | Jiri Pirko <jiri@mellanox.com> | Sat Oct 05 20:04:35 2019 +0200 |
committer | David S. Miller <davem@davemloft.net> | Sun Oct 06 15:44:46 2019 +0200 |
tree | 0bf717b0b51b394899fe5f043a0d3b03f46fb7d7 | |
parent | 1927f41a22a05e3bc178fa47f7ce7be271fbc541 [diff] |
net: genetlink: push attrbuf allocation and parsing to a separate function To be re-usable by dumpit as well, push the code that is taking care of attrbuf allocation and parting from doit into separate function. Introduce a helper to free the buffer too. Check family->maxattr too before calling kfree() to be symmetrical with the allocation check. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>