[PATCH 1/2] avoid memory leak

Jamie Couture jamie.couture at gmail.com
Sat Jun 4 01:21:01 CEST 2011


From: Jamie Couture <jamie.couture at gmail.com>

free rel when we're done
---
 scan-tree.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scan-tree.c b/scan-tree.c
index 627af1b..3f579ec 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -155,6 +155,8 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn)
 		config_fn = fn;
 		parse_configfile(xstrdup(p), &repo_config);
 	}
+
+	free(rel);
 }
 
 static void scan_path(const char *base, const char *path, repo_config_fn fn)
-- 
1.7.5.4





More information about the CGit mailing list