master - tools: add missing destroy_processing_handle in pvscan and vgreduce code
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a23655ab3bea4dfe9409c8c6b238787da9b457e1 Commit: a23655ab3bea4dfe9409c8c6b238787da9b457e1 Parent: f77fe436afb76ddb798d236d34daf50413a184f6 Author: Peter Rajnoha <[email protected]> AuthorDate: Fri Jun 17 13:29:33 2016 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Fri Jun 17 13:29:33 2016 +0200
tools: add missing destroy_processing_handle in pvscan and vgreduce code
--- tools/pvscan.c | 1 + tools/vgreduce.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
tools/pvscan.c +1 -0
@@ -655,6 +655,7 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv) out:unlock_vg (cmd,VG_GLOBAL ); +destroy_processing_handle (cmd, handle);return ret; }
tools/vgreduce.c +5 -2
@@ -237,8 +237,10 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) vp.force =arg_count (cmd, force_ARG);/* Needed to change the set of orphan PVs. */ -if (!lockd_gl (cmd,"ex" ,0 )) - return_ECMD_FAILED; +if (!lockd_gl (cmd,"ex" ,0 )) { + ret =ECMD_FAILED ; + goto_out; + } cmd->lockd_gl_disable =1 ; cmd->handles_missing_pvs =1 ;
@@ -259,6 +261,7 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) ret =ECMD_FAILED ; out:init_ignore_suspended_devices (saved_ignore_suspended_devices); +destroy_processing_handle (cmd, handle);return ret; }