aboutsummaryrefslogtreecommitdiff
path: root/drivers/mcb
diff options
context:
space:
mode:
authorRuss Weight2022-09-16 16:52:05 -0700
committerXu Yilun2022-09-19 12:58:19 +0800
commit468c9d928a8f38fdfaa61b05e81473cc7c8a6461 (patch)
tree30b029aeee697f8fd140e90c3d28a1c021ea9340 /drivers/mcb
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff)
fpga: m10bmc-sec: Fix possible memory leak of flash_buf
There is an error check following the allocation of flash_buf that returns without freeing flash_buf. It makes more sense to do the error check before the allocation and the reordering eliminates the memory leak. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 154afa5c31cd ("fpga: m10bmc-sec: expose max10 flash update count") Signed-off-by: Russ Weight <russell.h.weight@intel.com> Reviewed-by: Tom Rix <trix@redhat.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220916235205.106873-1-russell.h.weight@intel.com Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Diffstat (limited to 'drivers/mcb')
0 files changed, 0 insertions, 0 deletions