mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +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)) {
|
||||
vol->type = VIR_STORAGE_VOL_NETDIR;
|
||||
vol->target.format = VIR_STORAGE_FILE_DIR;
|
||||
*volptr = vol;
|
||||
vol = NULL;
|
||||
VIR_STEAL_PTR(*volptr, vol);
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -328,8 +327,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state,
|
||||
vol->target.compat = meta->compat;
|
||||
meta->compat = NULL;
|
||||
|
||||
*volptr = vol;
|
||||
vol = NULL;
|
||||
VIR_STEAL_PTR(*volptr, vol);
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virStorageSourceFree(meta);
|
||||
|
Loading…
Reference in New Issue
Block a user