Rather than open coding virStorageFileGetRelativeBackingPath
and virStorageFileGetMetadataRecurse, let's make use of the
VIR_STEAL_PTR macro.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
goto cleanup;
}
- *relpath = path;
- path = NULL;
+ VIR_STEAL_PTR(*relpath, path);
ret = 0;
goto cleanup;
}
- src->backingStore = backingStore;
- backingStore = NULL;
+ VIR_STEAL_PTR(src->backingStore, backingStore);
ret = 0;
cleanup: