Commit Diff


commit - f57ea9f3db923c517242dcf1eed8948a71d8a67c
commit + df610f472695eeed6f3a618d1833f17f767e9ed1
blob - 14209e4ea3ddc308fe76bdb22119849a2fdc5572
blob + 0fa917bcf26aed0154a46b3a681af4a7404d0777
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
@@ -830,7 +830,7 @@ got_output_repo_tree(struct request *c)
 	struct got_tree_object *tree = NULL;
 	struct repo_dir *repo_dir = t->repo_dir;
 	const char *name, *index_page_str, *folder;
-	char *id_str = NULL, *escaped_name;
+	char *id_str = NULL, *escaped_name = NULL;
 	char *path = NULL, *in_repo_path = NULL, *modestr = NULL;
 	int nentries, i, r;
 
@@ -967,8 +967,11 @@ got_output_repo_tree(struct request *c)
 		id_str = NULL;
 		free(modestr);
 		modestr = NULL;
+		free(escaped_name);
+		escaped_name = NULL;
 	}
 done:
+	free(escaped_name);
 	free(id_str);
 	free(modestr);
 	free(path);