Fix: missing NULL checks in logging statements
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 10802aa7b2cc66d87d0946ee53623b05b47a1c0f..3d0a65def51a0a727c3a5d08539c035f341701f5 100644 (file)
@@ -2413,9 +2413,9 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data)
                         * fallback on the 32-bit one,
                         */
                        DBG3("Looking for a kernel consumer at these locations:");
-                       DBG3("  1) %s", config.consumerd64_bin_path.value);
+                       DBG3("  1) %s", config.consumerd64_bin_path.value ? : "NULL");
                        DBG3("  2) %s/%s", INSTALL_BIN_PATH, DEFAULT_CONSUMERD_FILE);
-                       DBG3("  3) %s", config.consumerd32_bin_path.value);
+                       DBG3("  3) %s", config.consumerd32_bin_path.value ? : "NULL");
                        if (stat(config.consumerd64_bin_path.value, &st) == 0) {
                                DBG3("Found location #1");
                                consumer_to_use = config.consumerd64_bin_path.value;
@@ -5584,12 +5584,13 @@ int main(int argc, char **argv)
        /* Check if daemon is UID = 0 */
        is_root = !getuid();
 
+       if (create_lttng_rundir()) {
+               retval = -1;
+               goto exit_init_data;
+       }
+
        if (is_root) {
                /* Create global run dir with root access */
-               if (create_lttng_rundir()) {
-                       retval = -1;
-                       goto exit_init_data;
-               }
 
                kernel_channel_monitor_pipe = lttng_pipe_open(0);
                if (!kernel_channel_monitor_pipe) {
This page took 0.026417 seconds and 5 git commands to generate.