Check for calloc() failing

svn path=/trunk/netsurf/; revision=3885
This commit is contained in:
Rob Kendrick 2008-03-05 15:01:42 +00:00
parent 0e43415013
commit c9bd38f5dd
1 changed files with 3 additions and 0 deletions

View File

@ -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;