aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-host-generic.c
diff options
context:
space:
mode:
authorCong Wang <[email protected]>2020-06-12 07:16:55 +0000
committerDavid S. Miller <[email protected]>2020-06-12 21:05:08 +0000
commitb65ce380b754e77fbfdcfc83fd6e29c8ceedf431 (patch)
tree8a3a04539dbdafe4336223edb3b5da5684efdf77 /drivers/pci/controller/pci-host-generic.c
parentMerge branch 'net-ipa-endpoint-configuration-fixes' (diff)
downloadkernel-b65ce380b754e77fbfdcfc83fd6e29c8ceedf431.tar.gz
kernel-b65ce380b754e77fbfdcfc83fd6e29c8ceedf431.zip
genetlink: clean up family attributes allocations
genl_family_rcv_msg_attrs_parse() and genl_family_rcv_msg_attrs_free() take a boolean parameter to determine whether allocate/free the family attrs. This is unnecessary as we can just check family->parallel_ops. More importantly, callers would not need to worry about pairing these parameters correctly after this patch. And this fixes a memory leak, as after commit c36f05559104 ("genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()") we call genl_family_rcv_msg_attrs_parse() for both parallel and non-parallel cases. Fixes: c36f05559104 ("genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()") Reported-by: Ido Schimmel <[email protected]> Signed-off-by: Cong Wang <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Tested-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-host-generic.c')
0 files changed, 0 insertions, 0 deletions