Merge branch 'rs/realloc-array'
[gitweb.git] / builtin / for-each-ref.c
index 7f55e6816765f51ec60950060b3c8e5e484151a5..fda0f047125f16f080288c1cda76b0e337784a54 100644 (file)
@@ -631,7 +631,7 @@ static void populate_value(struct refinfo *ref)
        unsigned long size;
        const unsigned char *tagged;
 
-       ref->value = xcalloc(sizeof(struct atom_value), used_atom_cnt);
+       ref->value = xcalloc(used_atom_cnt, sizeof(struct atom_value));
 
        if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
                unsigned char unused1[20];