[PATCH 03/12] storage: remove extraneous call to VIR_DIR_CLOSE()

Laine Stump laine at redhat.com
Wed Oct 28 01:35:49 UTC 2020

VIR_DIR_CLOSE(dir) is called in the middle of
virStorageBackendRefreshLocal(), which is okay, but redundant - there
is no reference to dir between that call and the end of the function,
where VIR_DIR_CLOSE() is called again. Remove the extra call in the
middle to simplify the function and make the conversion to g_autoptr

Signed-off-by: Laine Stump <laine at redhat.com>
 src/storage/storage_util.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 21ad54ac54..7eaf899883 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -3553,7 +3553,6 @@ virStorageBackendRefreshLocal(virStoragePoolObjPtr pool)
     if (direrr < 0)
         goto cleanup;
-    VIR_DIR_CLOSE(dir);
     target = virStorageSourceNew();

More information about the libvir-list mailing list