bdiff: Fix bogus NULL return
authorMatt Mackall <mpm@selenic.com>
Mon, 06 Dec 2010 16:59:43 -0600
changeset 13090 c73745762f33
parent 13089 faee0ffbc24b
child 13091 8cecea387574
bdiff: Fix bogus NULL return
mercurial/bdiff.c
--- a/mercurial/bdiff.c	Mon Dec 06 16:42:48 2010 -0600
+++ b/mercurial/bdiff.c	Mon Dec 06 16:59:43 2010 -0600
@@ -275,7 +275,7 @@
 		/* sentinel end hunk */
 		curr->next = (struct hunk *)malloc(sizeof(struct hunk));
 		if (!curr->next)
-			return NULL;
+			return -1;
 		curr = curr->next;
 		curr->a1 = curr->a2 = an;
 		curr->b1 = curr->b2 = bn;