// check if the original lv is backed by a thin pool, in which case we
// cannot specify a size that's different from the original size.
ret = lvm_is_thin_volume(orig);
- if (ret == -1)
+ if (ret == -1) {
+ free(pathdup);
return -1;
+ }
if (!ret) {
ret = execlp("lvcreate", "lvcreate", "-s", "-L", sz, "-n", lv, orig, (char *)NULL);
p = strrchr(newfull, '/');
if (!p) {
ERROR("bad path: %s", path);
+ free(newfull);
return -1;
}
*p = '\0';
p = strrchr(newfull, '/');
if (!p) {
ERROR("bad path: %s", path);
+ free(newfull);
return -1;
}
*p = '\0';