summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2008-03-05 15:01:42 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2008-03-05 15:01:42 +0000
commitc9bd38f5dddd8b80622e68895da3fad9ac833709 (patch)
treea849a111f628be30ac9454cbb8a2d1552afae896
parent0e43415013af1b715ca43d287983a95a621d5ecf (diff)
downloadnetsurf-c9bd38f5dddd8b80622e68895da3fad9ac833709.tar.gz
netsurf-c9bd38f5dddd8b80622e68895da3fad9ac833709.tar.bz2
Check for calloc() failing
svn path=/trunk/netsurf/; revision=3885
-rw-r--r--content/fetchers/fetch_data.c3
1 files changed, 3 insertions, 0 deletions
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;