Code

Merge branch 'maint'
[git.git] / builtin-add.c
index f9a65803d8dcbb9ae7eb3a3c61d8ac345b84d1cd..b8e6094b21599051c543b1f77c991363d9dfe181 100644 (file)
@@ -44,6 +44,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
                        die("pathspec '%s' did not match any files",
                                        pathspec[i]);
        }
+        free(seen);
 }
 
 static void fill_directory(struct dir_struct *dir, const char **pathspec,
@@ -135,6 +136,7 @@ static void refresh(int verbose, const char **pathspec)
                if (!seen[i])
                        die("pathspec '%s' did not match any files", pathspec[i]);
        }
+        free(seen);
 }
 
 static int git_add_config(const char *var, const char *value)