LU-11233 utils: fix double-free of params fields
Call find_param_fini() on error so that the params are not leaked
during initialization if there is an intermediate error.
Zero out the parameters as they are freed, so if find_param_fini()
is called multiple times (as it is in some error paths) it does
not corrupt the heap by double freeing pointers. This can be hit
by calling "lfs getstripe -m" on multiple pathnames, some of which
do not exist.
Lustre-change: https://review.whamcloud.com/34711
Lustre-commit:
7c7c39d84c98df3c6fe33c04c9e391529a86db53
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie0d7e9ee134deb0633af2f8052b8a458333ebbe5
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35003
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>