X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=object.c;h=c9ca481498281adab056a364a3854180456f20f3;hb=7561d9f54412fcf443ebb28040bad67cd054a986;hp=c3616da8131f0cb0a53a8975d15be440c63eebc8;hpb=2b796360acbdf3186ab9a5dcb84fe416eda4ffd5;p=git.git diff --git a/object.c b/object.c index c3616da8..c9ca4814 100644 --- a/object.c +++ b/object.c @@ -60,7 +60,7 @@ void created_object(const unsigned char *sha1, struct object *obj) objs = xrealloc(objs, obj_allocs * sizeof(struct object *)); memset(objs + count, 0, (obj_allocs - count) * sizeof(struct object *)); - for (i = 0; i < count; i++) + for (i = 0; i < obj_allocs; i++) if (objs[i]) { int j = find_object(objs[i]->sha1); if (j != i) {