From: Francis Deslauriers Date: Tue, 28 Aug 2018 20:12:40 +0000 (-0400) Subject: Fix: leaking string by setting pointer to NULL before freeing it X-Git-Tag: v2.11.0-rc1~42 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=03e301513e0f0bb552ed5fd1cc8056900396652d;p=lttng-tools.git Fix: leaking string by setting pointer to NULL before freeing it Reported-by: Coverity (1395200) Resource leak Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/utils.c b/src/common/utils.c index 84d42f463..78bfbef95 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -337,7 +337,6 @@ char *_utils_expand_path(const char *path, bool keep_symlink) char *cwd_ret; cwd_ret = getcwd(current_working_dir, sizeof(current_working_dir)); if (!cwd_ret) { - absolute_path = NULL; goto error; } /*