From e8eec71d6e79c176d34dc8fda8780ed4dee447a2 Mon Sep 17 00:00:00 2001 From: Dotan Barak Date: Tue, 9 Sep 2008 21:57:10 +0300 Subject: Use xmalloc() and friends to catch allocation failures Some places use the standard malloc/strdup without checking if the allocation was successful; they should use xmalloc/xstrdup that check the memory allocation result. Signed-off-by: Dotan Barak Signed-off-by: Junio C Hamano --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http.c') diff --git a/http.c b/http.c index 1108ab4a31..0788936704 100644 --- a/http.c +++ b/http.c @@ -402,7 +402,7 @@ static struct fill_chain *fill_cfg = NULL; void add_fill_function(void *data, int (*fill)(void *)) { - struct fill_chain *new = malloc(sizeof(*new)); + struct fill_chain *new = xmalloc(sizeof(*new)); struct fill_chain **linkp = &fill_cfg; new->data = data; new->fill = fill; -- cgit v1.2.3