[libvirt PATCH 3/5++] fixup: vshInitDebug

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

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 tools/vsh.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index 1f384d4ea6..f9600bafba 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2915,10 +2915,9 @@ static int
 vshInitDebug(vshControl *ctl)
 {
     const char *debugEnv;
-    g_autofree char *env = NULL;
 
     if (ctl->debug == VSH_DEBUG_DEFAULT) {
-        env = g_strdup_printf("%s_DEBUG", ctl->env_prefix);
+        g_autofree char *env = g_strdup_printf("%s_DEBUG", ctl->env_prefix);
 
         /* log level not set from commandline, check env variable */
         debugEnv = getenv(env);
@@ -2935,7 +2934,7 @@ vshInitDebug(vshControl *ctl)
     }
 
     if (ctl->logfile == NULL) {
-        env = g_strdup_printf("%s_LOG_FILE", ctl->env_prefix);
+        g_autofree char *env = g_strdup_printf("%s_LOG_FILE", ctl->env_prefix);
 
         /* log file not set from cmdline */
         debugEnv = getenv(env);
-- 
2.31.1




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

  Powered by Linux