Without this change, attempts to examine revs->pending.objects[i].name when debugging produce random giberish. On the other hand, it introduces a small per-basis-ref memory leak. Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> --- For illustration. bundle.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/bundle.c b/bundle.c index 311c554..7aff369 100644 --- a/bundle.c +++ b/bundle.c @@ -226,8 +226,7 @@ static void list_prerequisite(int bundle_fd, struct object_array *pending, write_or_die(bundle_fd, buf.buf, buf.len); rev->object.flags |= UNINTERESTING; - add_object_array(&rev->object, buf.buf, pending); - strbuf_release(&buf); + add_object_array(&rev->object, strbuf_detach(&buf, NULL), pending); } static int list_prerequisites(int bundle_fd, struct rev_info *revs, -- 1.7.1.198.g8d802 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html