1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: fix memory leak

Reapply 23cc7ddc50 to internal version
of libdm.
This commit is contained in:
Zdenek Kabelac 2019-11-14 16:23:38 +01:00
parent 13c254fc05
commit 33c8e4de33

View File

@ -2012,7 +2012,8 @@ static int _sysfs_get_kernel_name(uint32_t major, uint32_t minor, char *buf, siz
log_sys_error("readlink", sysfs_path);
else {
log_sys_debug("readlink", sysfs_path);
return _sysfs_find_kernel_name(major, minor, buf, buf_size);
r = _sysfs_find_kernel_name(major, minor, buf, buf_size);
goto out;
}
goto bad;
}
@ -2033,6 +2034,7 @@ static int _sysfs_get_kernel_name(uint32_t major, uint32_t minor, char *buf, siz
strcpy(buf, name);
r = 1;
bad:
out:
free(temp_buf);
free(sysfs_path);