master - cov: avoid double call of free_hints() on error path
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cca2a652d1ac2fa67677e3dca50141efa8e2c1a9 Commit: cca2a652d1ac2fa67677e3dca50141efa8e2c1a9 Parent: eb06832b37d6d1e3d1c5fba69c5829d76d5d27a5 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Jun 22 11:07:34 2020 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Jun 24 15:01:03 2020 +0200
cov: avoid double call of free_hints() on error path
Since we 'free_hints()' on return error path from call of _read_hint_file(), avoid calling it twice in the middle of error path process.
--- lib/label/hints.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
lib/label/hints.c +1 -3
@@ -801,10 +801,8 @@ static int _read_hint_file(struct cmd_context *cmd, struct dm_list *hints, int *if (fclose (fp)) stack; -if (!ret) { -free_hints (hints); +if (!ret)return 0 ; - }if (!found)return 1 ;