Fix: Uninit. variable in lttng view
[lttng-tools.git] / src / bin / lttng / commands / view.c
index 430f8b62cfd208375691f3dda72ceb64f9ee881a..68ee4fa3ea1ec11343f07b40860bf3be03e85a2b 100644 (file)
@@ -339,6 +339,13 @@ static int view_trace(void)
                }
 
                trace_path = sessions[i].path;
+
+               if (sessions[i].enabled) {
+                       WARN("Session %s is running. Please stop it before reading it.",
+                                       session_name);
+                       ret = CMD_ERROR;
+                       goto free_sessions;
+               }
        } else {
                trace_path = opt_trace_path;
        }
This page took 0.024095 seconds and 4 git commands to generate.