diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index ecbf43054428ff1b5fc57d48987c2a4a087b6920..90a194ebc44c75f84bfa03e97fa1b96554e6f9cf 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -921,9 +921,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, vol->type = VIR_STORAGE_VOL_BLOCK; - /* A target path passed to CreateVol has no meaning */ VIR_FREE(vol->target.path); - if (virAsprintf(&vol->target.path, "%s/%s", pool->def->target.path, vol->name) == -1) diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c index 2e6e40792c5d4cc2604ca94abb1164bb8ddb783b..4129aaeb6d3ad0f8130c2acca61f54ad3c6a0324 100644 --- a/src/storage/storage_backend_zfs.c +++ b/src/storage/storage_backend_zfs.c @@ -303,11 +303,7 @@ virStorageBackendZFSCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED, vol->type = VIR_STORAGE_VOL_BLOCK; - if (vol->target.path != NULL) { - /* A target path passed to CreateVol has no meaning */ - VIR_FREE(vol->target.path); - } - + VIR_FREE(vol->target.path); if (virAsprintf(&vol->target.path, "%s/%s", pool->def->target.path, vol->name) == -1) return -1;