X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Futils.c;h=2473ca39ef24b755fa6054ea4c1eb9abf2c9a2eb;hb=4da99cdcb3c8258a4e71928cee04614d821e46a7;hp=735d97f99c0ae675826853aa7a400a90f26afb05;hpb=3237b610178d7788f4eeed68fec607226c676a7f;p=lttng-tools.git diff --git a/src/common/utils.c b/src/common/utils.c index 735d97f99..2473ca39e 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -176,6 +176,10 @@ char *utils_partial_realpath(const char *path, char *resolved_path, size_t size) error: free(resolved_path); free(cut_path); + free(try_path); + if (try_path_prev != try_path) { + free(try_path_prev); + } return NULL; } @@ -832,6 +836,7 @@ int utils_rotate_stream_file(char *path_name, char *file_name, uint64_t size, PERROR("Closing tracefile"); goto error; } + *stream_fd = -1; if (count > 0) { /*