Sync with 2.1.2
[gitweb.git] / builtin / log.c
index 4ea71fee6819e4d94812e64cc20cbf1027655013..2fb34c7de96a4236327d46bf1392d54fa882c17f 100644 (file)
@@ -1440,7 +1440,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                        continue;
 
                nr++;
-               list = xrealloc(list, nr * sizeof(list[0]));
+               REALLOC_ARRAY(list, nr);
                list[nr - 1] = commit;
        }
        if (nr == 0)