Add safety assert() in session daemon
[lttng-tools.git] / src / bin / lttng-sessiond / shm.c
index 584ae078f2d84fe07c32f4c8752850612908fc41..b94f4eb6a7aae86aed5fc080689e3f755456c719 100644 (file)
@@ -43,6 +43,8 @@ static int get_wait_shm(char *shm_path, size_t mmap_size, int global)
        int wait_shm_fd, ret;
        mode_t mode;
 
+       assert(shm_path);
+
        /* Default permissions */
        mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
 
@@ -138,6 +140,8 @@ char *shm_ust_get_mmap(char *shm_path, int global)
        int wait_shm_fd, ret;
        char *wait_shm_mmap;
 
+       assert(shm_path);
+
        wait_shm_fd = get_wait_shm(shm_path, mmap_size, global);
        if (wait_shm_fd < 0) {
                goto error;
This page took 0.0237 seconds and 4 git commands to generate.