mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
storage: Use VIR_STEAL_PTR for gluster volume processing
Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
cf46075293
commit
e687538d3a
@ -278,8 +278,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state,
|
|||||||
if (S_ISDIR(st->st_mode)) {
|
if (S_ISDIR(st->st_mode)) {
|
||||||
vol->type = VIR_STORAGE_VOL_NETDIR;
|
vol->type = VIR_STORAGE_VOL_NETDIR;
|
||||||
vol->target.format = VIR_STORAGE_FILE_DIR;
|
vol->target.format = VIR_STORAGE_FILE_DIR;
|
||||||
*volptr = vol;
|
VIR_STEAL_PTR(*volptr, vol);
|
||||||
vol = NULL;
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -328,8 +327,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state,
|
|||||||
vol->target.compat = meta->compat;
|
vol->target.compat = meta->compat;
|
||||||
meta->compat = NULL;
|
meta->compat = NULL;
|
||||||
|
|
||||||
*volptr = vol;
|
VIR_STEAL_PTR(*volptr, vol);
|
||||||
vol = NULL;
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virStorageSourceFree(meta);
|
virStorageSourceFree(meta);
|
||||||
|
Loading…
Reference in New Issue
Block a user