]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Examine.c: Fix memory leaks in Examine()
authorAnna Sztukowska <anna.sztukowska@intel.com>
Thu, 8 Aug 2024 15:02:38 +0000 (17:02 +0200)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Tue, 10 Sep 2024 08:56:56 +0000 (10:56 +0200)
commitda26064bfe4457d5037f3a1f1bb83a54225c6375
treeb567aa633d12c177a756145dbd850deb01353e22
parentdd0d193ad8722140e240c95a4fd1e214077dd719
Examine.c: Fix memory leaks in Examine()

Fix memory leaks in Examine() reported by SAST analysis. Implement a
method to traverse and free all the nodes of the doubly linked list.
Replace for loop with while loop in order to improve redability of the
code and free allocated memory correctly.

Signed-off-by: Anna Sztukowska <anna.sztukowska@intel.com>
Examine.c
dlink.c
dlink.h