[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] storage: fix leak in virStorageBackendLogicalMakeVol



Use regfree instead of VIR_FREE.
---
 src/storage/storage_backend_logical.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 2734689..bd902fe 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -264,7 +264,7 @@ virStorageBackendLogicalMakeVol(virStoragePoolObjPtr pool,
 
 cleanup:
     VIR_FREE(regex);
-    VIR_FREE(reg);
+    regfree(reg);
     VIR_FREE(vars);
     if (is_new_vol && (ret == -1))
         virStorageVolDefFree(vol);
-- 
1.7.8.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]