Browse Source

Don't leave _info.NNNN files lying arond

Rusty Russell 17 years ago
parent
commit
cc1e3419b6
3 changed files with 4 additions and 3 deletions
  1. 1 1
      tools/create_dep_tar.c
  2. 2 1
      tools/namespacize.c
  3. 1 1
      tools/run_tests.c

+ 1 - 1
tools/create_dep_tar.c

@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
 	printf("creating tar ball of \"%s\"\n", argv[1]);	
 	printf("creating tar ball of \"%s\"\n", argv[1]);	
 
 
 	/* creating tar of the module dependencies */
 	/* creating tar of the module dependencies */
-	deps = get_deps(NULL, argv[1]);
+	deps = get_deps(talloc_autofree_context(), argv[1]);
 	if (deps != NULL)
 	if (deps != NULL)
 		create_tar(deps, argv[1], argv[2]);
 		create_tar(deps, argv[1], argv[2]);
 	talloc_free(deps);
 	talloc_free(deps);

+ 2 - 1
tools/namespacize.c

@@ -476,7 +476,7 @@ static char *parent_dir(const void *ctx, const char *dir)
 
 
 static void adjust_dir(const char *dir)
 static void adjust_dir(const char *dir)
 {
 {
-	char *parent = parent_dir(NULL, dir);
+	char *parent = parent_dir(talloc_autofree_context(), dir);
 	char **deps;
 	char **deps;
 
 
 	verbose("Adjusting %s\n", dir);
 	verbose("Adjusting %s\n", dir);
@@ -497,6 +497,7 @@ static void adjust_dir(const char *dir)
 		talloc_free(depdir);
 		talloc_free(depdir);
 	}
 	}
 	verbose_unindent();
 	verbose_unindent();
+	talloc_free(parent);
 }
 }
 
 
 static void adjust_dependents(const char *dir)
 static void adjust_dependents(const char *dir)

+ 1 - 1
tools/run_tests.c

@@ -106,7 +106,7 @@ static int build(const char *dir, const char *name, int fail)
 	char *externals = talloc_strdup(name, "");
 	char *externals = talloc_strdup(name, "");
 	char **deps;
 	char **deps;
 
 
-	for (deps = get_deps(objs, dir); *deps; deps++) {
+	for (deps = get_deps(talloc_autofree_context(), dir); *deps; deps++) {
 		if (!strstarts(*deps, "ccan/"))
 		if (!strstarts(*deps, "ccan/"))
 			continue;
 			continue;