Hi, my static analyzer tool reported a potential uaf in qlcnic_probe. The problem file is drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c in Linux Kernel-5.12-rc2.
In funtion qlcnic_probe around line 2623, it calls qlcnic_dcb_enable() to enable adapter->dcb. But the adapter->dcb could be freed inside this callee when qlcnic_dcb_attach(dcb) return non-zero. Later the adapter->dcb is used by qlcnic_dcb_get_info(adapter->dcb) and could cause a use after free. Thanks for your time.