X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Ftrace-chunk.c;h=9f0919a8896b7756121ffe18d6580e0550637f37;hb=9bb5f1f8c4f1aeaca00ebbca40fc145dc4c7ee52;hp=40e612800a5c8e6dd31442593d27e94eea81fbbc;hpb=f7399c50a8c8c65ecb53107e63a5e8f13424c63a;p=lttng-tools.git diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index 40e612800..9f0919a88 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -656,7 +656,7 @@ int add_top_level_directory_unique(struct lttng_trace_chunk *chunk, } 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)"); @@ -1096,7 +1096,7 @@ end: return registry; error: lttng_trace_chunk_registry_destroy(registry); - goto end; + return NULL; } LTTNG_HIDDEN