From c9bd38f5dddd8b80622e68895da3fad9ac833709 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Wed, 5 Mar 2008 15:01:42 +0000 Subject: Check for calloc() failing svn path=/trunk/netsurf/; revision=3885 --- content/fetchers/fetch_data.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'content') diff --git a/content/fetchers/fetch_data.c b/content/fetchers/fetch_data.c index eefcb312d..6d4befada 100644 --- a/content/fetchers/fetch_data.c +++ b/content/fetchers/fetch_data.c @@ -75,6 +75,9 @@ static void *fetch_data_setup(struct fetch *parent_fetch, const char *url, { struct fetch_data_context *ctx = calloc(1, sizeof(*ctx)); + if (ctx == NULL) + return NULL; + RING_INSERT(ring, ctx); ctx->parent_fetch = parent_fetch; -- cgit v1.2.3