projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: return NULL on trace chunk registry failure
[lttng-tools.git]
/
src
/
common
/
trace-chunk.c
diff --git
a/src/common/trace-chunk.c
b/src/common/trace-chunk.c
index e853d7366ccc1115a7630b894a5bc9c7e53beb04..9f0919a8896b7756121ffe18d6580e0550637f37 100644
(file)
--- a/
src/common/trace-chunk.c
+++ b/
src/common/trace-chunk.c
@@
-410,7
+410,7
@@
bool is_valid_chunk_name(const char *name)
return false;
}
return false;
}
- len = strnlen(name, LTTNG_NAME_MAX);
+ len =
lttng_
strnlen(name, LTTNG_NAME_MAX);
if (len == 0 || len == LTTNG_NAME_MAX) {
return false;
}
if (len == 0 || len == LTTNG_NAME_MAX) {
return false;
}
@@
-656,7
+656,7
@@
int add_top_level_directory_unique(struct lttng_trace_chunk *chunk,
}
if (!found) {
}
if (!found) {
- char *copy = strndup(new_path, new_path_top_level_len);
+ char *copy =
lttng_
strndup(new_path, new_path_top_level_len);
DBG("Adding new top-level directory \"%s\" to trace chunk \"%s\"",
new_path, chunk->name ? : "(unnamed)");
DBG("Adding new top-level directory \"%s\" to trace chunk \"%s\"",
new_path, chunk->name ? : "(unnamed)");
@@
-1096,7
+1096,7
@@
end:
return registry;
error:
lttng_trace_chunk_registry_destroy(registry);
return registry;
error:
lttng_trace_chunk_registry_destroy(registry);
-
goto end
;
+
return NULL
;
}
LTTNG_HIDDEN
}
LTTNG_HIDDEN
This page took
0.023194 seconds
and
4
git commands to generate.