Loading
examples/hello_sock: free I/O buffer in main()
Do not depend on start of the application
to free the I/O buffer in closing poller.
Instead do that in main on every exit path.
There is a negative test case with hello_sock,
which shows mem leak when ASAN is enabled.
See test case:
test/iscsi_tgt/sock/sock.sh:126
Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x7f48846ba097 in calloc (/usr/lib64/libasan.so.8+0xba097)
#1 0x408ffe in main /home/vagrant/spdk_repo/spdk/examples/sock/hello_world/hello_sock.c:562
#2 0x7f488370750f in __libc_start_call_main (/usr/lib64/libc.so.6+0x2750f)
Signed-off-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib7dcad385e5c01128cab71d108832a8ac0594709
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20734
Reviewed-by:
Jim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>