virStorageFileGetRelativeBackingPath and virStorageFileGetMetadataRecurse open coded. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx> --- src/util/virstoragefile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 828e95d5d3..c6425308fb 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4208,8 +4208,7 @@ virStorageFileGetRelativeBackingPath(virStorageSourcePtr top, goto cleanup; } - *relpath = path; - path = NULL; + VIR_STEAL_PTR(*relpath, path); ret = 0; @@ -4947,8 +4946,7 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src, goto cleanup; } - src->backingStore = backingStore; - backingStore = NULL; + VIR_STEAL_PTR(src->backingStore, backingStore); ret = 0; cleanup: -- 2.20.1