Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
  State the effect of filter-branch on graft explicitly
  process_{tree,blob}: Remove useless xstrdup calls
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 7ffe03f..c119395 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -31,6 +31,9 @@
 useful in the future for compensating for some git bugs or such,
 therefore such a usage is permitted.
 
+*NOTE*: This command honors `.git/info/grafts`. If you have any grafts
+defined, running this command will make them permanent.
+
 *WARNING*! The rewritten history will have different object names for all
 the objects and will not converge with the original branch.  You will not
 be able to easily push and distribute the rewritten branch on top of the
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 9fc3b35..6cf5b86 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1912,6 +1912,8 @@
 	add_preferred_base_object(p->name);
 	add_object_entry(p->item->sha1, p->item->type, p->name, 0);
 	p->item->flags |= OBJECT_ADDED;
+	free((char *)p->name);
+	p->name = NULL;
 }
 
 static void show_edge(struct commit *commit)