Fix: relayd: crash on creation of session by peer < 2.11
[lttng-tools.git] / src / common / trace-chunk.c
index ea952220b880ad4a12e106a13c90973cfdda1d19..32792926928d6abb6ebed749460e3a970307c2f3 100644 (file)
@@ -905,7 +905,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_rename_path_no_lock(
                if (status != LTTNG_TRACE_CHUNK_STATUS_OK) {
                        ERR("Error removing subdirectory '%s' file when deleting chunk",
                                old_path);
-                       ret = -1;
                        goto end;
                }
        } else {
@@ -1031,7 +1030,7 @@ enum lttng_trace_chunk_status lttng_trace_chunk_set_as_owner(
                status = LTTNG_TRACE_CHUNK_STATUS_ERROR;
                goto end;
        }
-       if (chunk->path[0] != '\0') {
+       if (chunk->path && chunk->path[0] != '\0') {
                ret = lttng_directory_handle_create_subdirectory_as_user(
                                session_output_directory,
                                chunk->path,
@@ -1495,7 +1494,7 @@ end:
        return status;
 }
 
-LTTNG_HIDDEN
+static
 int lttng_trace_chunk_remove_subdirectory_recursive(struct lttng_trace_chunk *chunk,
                const char *path)
 {
This page took 0.024029 seconds and 4 git commands to generate.