Whamcloud - gitweb
LU-16614 lfs: Fix memory leak 96/50196/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Fri, 3 Mar 2023 09:10:01 +0000 (14:40 +0530)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Mar 2023 06:09:35 +0000 (06:09 +0000)
commit2186b332d8bcba29f715ab8147f751d2a5726fc7
treecebb9e783d37cdf7d1333899dcb8137b22c5a342
parent6f1f422d86d187bffd018d96c3198621f3c71fdf
LU-16614 lfs: Fix memory leak

Fix memory leak while running "lfs check all"

Before patch:
=============
$ valgrind --leak-check=full lfs check all
<snip>
==93768== LEAK SUMMARY:
==93768==    definitely lost: 56 bytes in 2 blocks
==93768==    indirectly lost: 282 bytes in 5 blocks
==93768==      possibly lost: 0 bytes in 0 blocks
==93768==    still reachable: 0 bytes in 0 blocks
==93768==         suppressed: 0 bytes in 0 blocks
<snip>

After patch:
=============
$ valgrind --leak-check=full lfs check all
<snip>
 HEAP SUMMARY:
   in use at exit: 0 bytes in 0 blocks
 total heap usage: 98 allocs, 98 frees, 294,999 bytes allocated
 All heap blocks were freed -- no leaks are possible
<snip>

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ib39d1f89a9c6937668f2a7d515606c7df86ac1df
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50196
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/liblustreapi.c