Merge branch 'as/calloc-takes-nmemb-then-size'
[gitweb.git] / builtin / for-each-ref.c
index 47bd624696d5e94295dda8846f00dcbb80a6ca5a..69bba067189776d8411b1926084b53659799d0da 100644 (file)
@@ -633,7 +633,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];