mercurial/bdiff.c
changeset 35677 cf2e2a7399bc
parent 34632 7201e3607d90
child 35723 50868145a8de
--- a/mercurial/bdiff.c	Tue Jan 16 08:40:14 2018 -0500
+++ b/mercurial/bdiff.c	Wed Jan 17 21:36:18 2018 +0000
@@ -41,7 +41,7 @@
 	if (p == plast)
 		i++;
 
-	*lr = l = (struct bdiff_line *)malloc(sizeof(struct bdiff_line) * i);
+	*lr = l = (struct bdiff_line *)calloc(i, sizeof(struct bdiff_line));
 	if (!l)
 		return -1;