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>
Thu, 30 Aug 2018 17:36:37 +0000 (13:36 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index bc3b49b71558013cfdfa04b15c624a280821c938..2c571c4a8dc38d379f8b675c7dc0c5a2636ec2c1 100644 (file)
@@ -2502,7 +2502,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.028095 seconds and 4 git commands to generate.