mercurial/diffhelpers.c
branchstable
changeset 23959 c8e7fa41bfc5
parent 16695 0a0933d3d59c
child 23964 f1c127df7c4f
--- a/mercurial/diffhelpers.c	Sun Jan 25 22:55:10 2015 -0500
+++ b/mercurial/diffhelpers.c	Tue Jan 27 10:07:04 2015 -0500
@@ -34,6 +34,9 @@
 		sz -= 1;
 
 	hline = PyBytes_FromStringAndSize(l, sz-1);
+	if (!hline) {
+		return NULL;
+	}
 
 	if (c == ' ' || c == '+') {
 		PyObject *rline = PyBytes_FromStringAndSize(l + 1, sz - 2);
@@ -194,4 +197,3 @@
 	                                        NULL, NULL);
 }
 #endif
-