Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
check_if_lustre_mounted() doesn't free the allocated memory if failure:
[root@server17 e2fsprogs_whamcloud.git]# valgrind --leak-check=full /root/lixi/e2fsck/e2fsprogs_whamcloud.git/e2fsck/e2fsck -v -f -tt -n /dev/sdl1 ==25501== Memcheck, a memory error detector ==25501== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==25501== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==25501== Command: /root/lixi/e2fsck/e2fsprogs_whamcloud.git/e2fsck/e2fsck -v -f -tt -n /dev/sdl1 ==25501== e2fsck 1.45.2.wc1 (27-May-2019) Cannot resolve path /dev/sdl1 /root/lixi/e2fsck/e2fsprogs_whamcloud.git/e2fsck/e2fsck: No such file or directory while trying to open /dev/sdl1 Possibly non-existent device? ==25501== ==25501== HEAP SUMMARY: ==25501== in use at exit: 6,565 bytes in 39 blocks ==25501== total heap usage: 155 allocs, 116 frees, 28,085 bytes allocated ==25501== ==25501== 4,096 bytes in 1 blocks are definitely lost in loss record 26 of 26 ==25501== at 0x4C29BC3: malloc (vg_replace_malloc.c:299) ==25501== by 0x452116: check_if_lustre_mounted (ismounted.c:520) ==25501== by 0x452116: ext2fs_check_mount_point (ismounted.c:609) ==25501== by 0x40FC12: check_mount (unix.c:235) ==25501== by 0x40FC12: main (unix.c:1577) ==25501== ==25501== LEAK SUMMARY: ==25501== definitely lost: 4,096 bytes in 1 blocks ==25501== indirectly lost: 0 bytes in 0 blocks ==25501== possibly lost: 0 bytes in 0 blocks ==25501== still reachable: 2,469 bytes in 38 blocks ==25501== suppressed: 0 bytes in 0 blocks ==25501== Reachable blocks (those to which a pointer was found) are not shown. ==25501== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==25501== ==25501== For counts of detected and suppressed errors, rerun with: -v ==25501== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) [root@server17 e2fsprogs_whamcloud.git]# valgrind --leak-check=full /root/lixi/e2fsck/e2fsprogs_whamcloud.git/e2fsck/e2fsck -v -f -tt -n /dev/sdl1 ^C