master - mirrors: fix leak in device_is_usable mirror check
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ec49f07b0dc89720f4a74a1212e106990099d2d6 Commit: ec49f07b0dc89720f4a74a1212e106990099d2d6 Parent: f942ae4a7af0f9b93c6a6aacb1793ee22f87ed13 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Dec 6 23:37:21 2012 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Dec 11 11:15:22 2012 +0100
mirrors: fix leak in device_is_usable mirror check
Function _ignore_blocked_mirror_devices was not release allocated strings images_health and log_health.
In error paths it was also not releasing dm_task structure.
Swaped return code of _ignore_blocked_mirror_devices and use 1 as success.
In _parse_mirror_status use log_error if memory allocation fails and few more errors so they are no going unnoticed as debug messages.
On error path always clear return values and free strings.
For dev_create_file use cache mem pool to avoid memleak.
--- WHATS_NEW | 1 + lib/activate/dev_manager.c | 60 ++++++++++++++++++++++++++++++-------------- 2 files changed, 42 insertions(+), 19 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Fix memleak in device_is_usable mirror testing function. Do not ignore -f in lvconvert --repair -y -f for mirror and raid volumes. Disallow pvmove on RAID LVs until they are addressed properly Allow empty activation/{auto_activation|read_only|}_volume_list config option.
lib/activate/dev_manager.c +41 -19
115 lines not on this page · raw message