stable-2.02 - cov: Clarify the control flow
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c24fa7b7b714871950e0366ca4c35d0e601786ff Commit: c24fa7b7b714871950e0366ca4c35d0e601786ff Parent: 3fe2610cff1afc1eaf9bc9c141950fe8ded73793 Author: Marian Csontos <[email protected]> AuthorDate: Mon Oct 21 15:32:09 2019 +0200 Committer: Marian Csontos <[email protected]> CommitterDate: Mon Oct 21 15:32:09 2019 +0200
cov: Clarify the control flow
Return need a clean up but it is not bailing out due to an error.
Fix: 402b41f58dc14160ec21937d6308b0d9a1abba7d
--- libdm/libdm-common.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
libdm/libdm-common.c +2 -1
@@ -2013,7 +2013,7 @@ static int _sysfs_get_kernel_name(uint32_t major, uint32_t minor, char *buf, sizelse {log_sys_debug ("readlink" , sysfs_path); r =_sysfs_find_kernel_name (major, minor, buf, buf_size); - goto bad; + goto out; } goto bad; }
@@ -2034,6 +2034,7 @@ static int _sysfs_get_kernel_name(uint32_t major, uint32_t minor, char *buf, sizstrcpy (buf, name); r =1 ; bad: +out:dm_free (temp_buf);dm_free (sysfs_path);