[PATCH 04/14] virnetsockettest: Need to initialize 'path'

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

 



It was possible to call VIR_FREE in cleanup prior to initialization
---
 tests/virnetsockettest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index b968973..aaa6acb 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -207,7 +207,7 @@ static int testSocketUNIXAccept(const void *data ATTRIBUTE_UNUSED)
     virNetSocketPtr csock = NULL; /* Client socket */
     int ret = -1;
 
-    char *path;
+    char *path = NULL;
     char *tmpdir;
     char template[] = "/tmp/libvirt_XXXXXX";
 
@@ -257,7 +257,7 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
     virNetSocketPtr csock = NULL; /* Client socket */
     int ret = -1;
 
-    char *path;
+    char *path = NULL;
     char *tmpdir;
     char template[] = "/tmp/libvirt_XXXXXX";
 
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]