diff options
author | 2022-09-16 16:52:05 -0700 | |
---|---|---|
committer | 2022-09-19 12:58:19 +0800 | |
commit | 468c9d928a8f38fdfaa61b05e81473cc7c8a6461 (patch) | |
tree | 30b029aeee697f8fd140e90c3d28a1c021ea9340 /scripts/generate_rust_analyzer.py | |
parent | Linux 6.0-rc1 (diff) | |
download | linux-rng-468c9d928a8f38fdfaa61b05e81473cc7c8a6461.tar.xz linux-rng-468c9d928a8f38fdfaa61b05e81473cc7c8a6461.zip |
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 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions