From: Michael Jeanson Date: Wed, 18 May 2016 16:17:27 +0000 (-0400) Subject: Fix: Double free in utils_partial_realpath error path X-Git-Tag: v2.8.0~32 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;ds=inline;h=24f7b10f38876378005570a403847596c7dc1a23;p=lttng-tools.git Fix: Double free in utils_partial_realpath error path Fixes coverity #1355521 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/utils.c b/src/common/utils.c index 30a5f106b..901ddb036 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -190,7 +190,9 @@ error: free(resolved_path); free(cut_path); free(try_path); - free(try_path_prev); + if (try_path_prev != try_path) { + free(try_path_prev); + } return NULL; }