Fix: potential use of NULL path in stat() use
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Aug 2018 17:36:37 +0000 (13:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Sep 2018 16:21:48 +0000 (12:21 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index f7b3c7c84d1add69c1114e89f81ac4911490b33d..fa6fa4830e468efc0180a88e1888434f67955a25 100644 (file)
@@ -2436,7 +2436,8 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data)
                        } else if (stat(INSTALL_BIN_PATH "/" DEFAULT_CONSUMERD_FILE, &st) == 0) {
                                DBG3("Found location #2");
                                consumer_to_use = INSTALL_BIN_PATH "/" DEFAULT_CONSUMERD_FILE;
-                       } else if (stat(config.consumerd32_bin_path.value, &st) == 0) {
+                       } else if (config.consumerd32_bin_path.value &&
+                                       stat(config.consumerd32_bin_path.value, &st) == 0) {
                                DBG3("Found location #3");
                                consumer_to_use = config.consumerd32_bin_path.value;
                        } else {
This page took 0.028302 seconds and 5 git commands to generate.