[PATCH] bonding: Fix reference count leak in bond_sysfs_slave_add.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Fixes: 07699f9a7c8d ("bonding: add sysfs

[PATCH] qlcnic: fix missing release in qlcnic_83xx_interrupt_test.

2020-05-25 Thread wu000273
From: Qiushi Wu In function qlcnic_83xx_interrupt_test(), function qlcnic_83xx_diag_alloc_res() is not handled by function qlcnic_83xx_diag_free_res() after a call of the function qlcnic_alloc_mbx_args() failed. Fix this issue by adding a jump target "fail_mbx_args", and jump to this new target w

[PATCH] net: sun: fix missing release regions in cas_init_one().

2020-05-22 Thread wu000273
From: Qiushi Wu In cas_init_one(), "pdev" is requested by "pci_request_regions", but it was not released after a call of the function “pci_write_config_byte” failed. Thus replace the jump target “err_write_cacheline” by "err_out_free_res". Fixes: 1f26dac32057 ("[NET]: Add Sun Cassini driver.")

[PATCH v2] net/mlx4_core: fix a memory leak bug.

2020-05-22 Thread wu000273
From: Qiushi Wu In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Fixes: fe6f700d6cbb ("net/mlx4_core: Respond to operation re

[PATCH v3] rxrpc: fix a memory leak in rxkad_verify_response().

2020-05-22 Thread wu000273
From: Qiushi Wu A ticket was not released after a call of the function “rxkad_decrypt_ticket” failed. Thus replace the jump target “temporary_error_free_resp” by “temporary_error_free_ticket”. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- ne

[PATCH v2] rxrpc: fix a memory leak bug.

2020-05-22 Thread wu000273
From: Qiushi Wu A ticket was not released after a call of the function “rxkad_decrypt_ticket” failed. Thus replace the jump target “temporary_error_free_resp” by “temporary_error_free_ticket”. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- ne

[PATCH] net/mlx4_core: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Fixes: fe6f700d6cbb7 ("Respond to operation request by firmw

[PATCH] rxrpc: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In function rxkad_verify_response(), pointer "ticket" is not released, when function rxkad_decrypt_ticket() returns an error, causing a memory leak bug. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- net/rxrpc/rxkad.c | 3 +--

[PATCH v3] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Thus add a call of the function “nfp_nsp_close” for the completion of the exception handling. Fix

[PATCH v2] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Thus add a call of the function “nfp_nsp_close” for the completion of the exception handling. Fix

[PATCH] nfp: abm: fix a memory leak bug

2020-05-02 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Fix this issue by adding nfp_nsp_close(nsp) in the error path. Signed-off-by: Qiushi Wu --- dri