Commit Diff


commit - 230e1f1bfa1d7bbd0dee0217e22bc2817e848ad0
commit + 1df44de6f73549388bc170ad065645811ab002d0
blob - 05d16ce90ea867ddc912cd1321d68b0262228307
blob + 932a52a9669dfee7e287f4aaa5274fb549f19472
--- lib/buf.c
+++ lib/buf.c
@@ -57,7 +57,7 @@ buf_alloc(BUF **b, size_t len)
 
 	*b = malloc(sizeof(**b));
 	if (*b == NULL)
-		return NULL;
+		return got_error_from_errno("malloc");
 	/* Postpone creation of zero-sized buffers */
 	if (len > 0) {
 		(*b)->cb_buf = calloc(1, len);