From: Laine Stump <[email protected]>
Found with valgrind + lutter.
The result of pathjoin() was used only as an argument to tree_find(),
but wasn't being freed before return. Over the course of 12 hours or
so running the latest virt-manager, this racked up a few hundred MB of
leaked memory.
A shorter (but still valid) test of 1/2 an hour after applying the fix
showed no leaks.
---
src/transform.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/transform.c b/src/transform.c
index 39c3bda..90ce824 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -581,6 +581,7 @@ static struct tree *file_info(struct augeas *aug, const
char *fname) {
result = tree_find(aug, path);
ERR_BAIL(aug);
error:
+ free(path);
return result;
}
--
1.6.6.1
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel