[libvirt] [PATCH 07/14] virfile: Need to initialize 'looppath'

John Ferlan jferlan at redhat.com
Tue Jan 22 14:15:43 UTC 2013


It was possible to call VIR_FREE in cleanup prior to initialization.
---
 src/util/virfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virfile.c b/src/util/virfile.c
index 50999aa..5cca54d 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -602,7 +602,7 @@ static int virFileLoopDeviceOpen(char **dev_name)
     int fd = -1;
     DIR *dh = NULL;
     struct dirent *de;
-    char *looppath;
+    char *looppath = NULL;
     struct loop_info64 lo;
 
     VIR_DEBUG("Looking for loop devices in /dev");
-- 
1.7.11.7




More information about the libvir-list mailing list