Found by coverity:
** CID
1136989: Unchecked return value from library (CHECKED_RETURN)
/formats/lttng-live/lttng-live-functions.c: 374 in lttng_live_attach_session()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
path = strdup(LTTNG_METADATA_PATH_TEMPLATE);
path = mkdtemp(path);
ctx->session->streams[i].metadata_flag = 1;
- mkdir(path, S_IRWXU | S_IRWXG);
snprintf(ctx->session->streams[i].path,
sizeof(ctx->session->streams[i].path),
"%s/%s", path,
O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (ret < 0) {
+ perror("open");
goto error;
}
ctx->session->streams[i].fd = ret;