Skip to contentSkip to conversation

Fix: Double free in utils_partial_realpath error path

PATCH Jérémie Galarneau 1 participant 1 message May 18, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jérémie Galarneau

author Applied
#1 lore raw

Merged, thanks!

Jérémie

Quoted 25 lines · Michael Jeanson

Fixes coverity #1355521

---
 src/common/utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
src/common/utils.c +3 -2
index 30a5f10..901ddb0 100644
@@ -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;
 }
 
--

2.7.4

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev