X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Futils.c;h=1e52ae0aa073640a34f8b035376bb6b5119d5660;hp=f75e7b0068a6b03df3c8f9fe2f2f0e1aeaaae2c3;hb=acd5e40db2b80f93f4b9ce2cd85ae0d3a6ce930c;hpb=b7dce40d330fdaf67a8db5d5941573ff812bbd77 diff --git a/src/common/utils.c b/src/common/utils.c index f75e7b006..1e52ae0aa 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -189,6 +189,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; } @@ -850,6 +854,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) { /*