summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorDotan Barak <dotanba@gmail.com>2008-09-09 21:57:10 +0300
committerJunio C Hamano <gitster@pobox.com>2008-09-09 16:28:05 -0700
commite8eec71d6e79c176d34dc8fda8780ed4dee447a2 (patch)
tree67faf2bc865ed17e29ab2ad042a526bc6383a7e3 /http.c
parent4886b89f8fde57b76738c96761eecbfbd0b13112 (diff)
downloadgit-e8eec71d6e79c176d34dc8fda8780ed4dee447a2.tar.gz
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 <dotanba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c2
1 files changed, 1 insertions, 1 deletions
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;