+5
−10
Loading
Fixed issues detected by Coverity. The file_handle_delete(fhandle) function, which frees memory pointed by 'fhandle', was called before the 'fhandle' was printed by SPDK_DEBUGLOG(). This caused that Coverity scan detected 'use after free' error. Now file_handle_delete(fhandle) is called after the pointer value is printed, so this shall remove the error. Changing the order of calls will not change anything in this case, but shall keep the Coverity happy. BTW, printing the pointer value after the memory pointed by it is freed shall be harmless, but let's keep the code clean and try to avoid future error/warnings generated by scan tools. Change-Id: Ie0c407befe77984704bf7d3533271297d70bf259 Signed-off-by:Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24632 Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Changpeng Liu <changpeliu@tencent.com> Community-CI: Mellanox Build Bot