summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-09 13:54:42 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-09 13:54:42 -0700
commit016cd9f6654248ebfc25f3c0d3b0e6ee6f2c81f0 (patch)
tree59ea0858fbdb88a97a466e6c3468038796ad252c /read-cache.c
parentMerge branch 'fix' (diff)
parentread-cache.c: use xcalloc() not calloc() (diff)
downloadtgif-016cd9f6654248ebfc25f3c0d3b0e6ee6f2c81f0.tar.xz
Merge branch 'fix'
* fix: read-cache.c: use xcalloc() not calloc() apply: fix infinite loop with multiple patches with --index
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index f97f92d90a..a917ab0cfe 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -552,7 +552,7 @@ int read_cache(void)
active_nr = ntohl(hdr->hdr_entries);
active_alloc = alloc_nr(active_nr);
- active_cache = calloc(active_alloc, sizeof(struct cache_entry *));
+ active_cache = xcalloc(active_alloc, sizeof(struct cache_entry *));
offset = sizeof(*hdr);
for (i = 0; i < active_nr; i++) {