[PATCH] AppArmorSetSecurityImageLabel: Avoid use of uninitialized variable

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

 



The @profile_name variable can be used uninitialized.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---

Pushing under trivial and build breaker rules.

 src/security/security_apparmor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
index eb80d23..adc9918 100644
--- a/src/security/security_apparmor.c
+++ b/src/security/security_apparmor.c
@@ -683,7 +683,7 @@ AppArmorSetSecurityImageLabel(virSecurityManagerPtr mgr,
                               virDomainDefPtr def, virDomainDiskDefPtr disk)
 {
     int rc = -1;
-    char *profile_name;
+    char *profile_name = NULL;
     const virSecurityLabelDefPtr secdef =
         virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
 
-- 
1.8.1.5

--
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]