[PATCH 02/14] conf: Need to initialize variables before VIR_FREE

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

 



Resolve a couple of instances where variables were not initialized
prior to potential VIR_FREE call in cleanup path.
---
 src/conf/domain_audit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 7082804..c00bd11 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -201,7 +201,7 @@ virDomainAuditNetDevice(virDomainDefPtr vmDef, virDomainNetDefPtr netDef,
     char uuidstr[VIR_UUID_STRING_BUFLEN];
     char macstr[VIR_MAC_STRING_BUFLEN];
     char *vmname;
-    char *dev_name;
+    char *dev_name = NULL;
     char *rdev;
     const char *virt;
 
@@ -504,7 +504,7 @@ virDomainAuditCgroupPath(virDomainObjPtr vm, virCgroupPtr cgroup,
 {
     char *detail;
     char *rdev;
-    char *extra;
+    char *extra = NULL;
 
     /* Nothing to audit for regular files.  */
     if (rc > 0)
-- 
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]