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

[libvirt] [PATCH] AppArmorSetSecurityImageLabel: Avoid use of uninitialized variable



The @profile_name variable can be used uninitialized.

Signed-off-by: Michal Privoznik <mprivozn redhat com>
---

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


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