diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2008-03-05 15:01:42 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2008-03-05 15:01:42 +0000 |
commit | c9bd38f5dddd8b80622e68895da3fad9ac833709 (patch) | |
tree | a849a111f628be30ac9454cbb8a2d1552afae896 /content/fetchers/fetch_data.c | |
parent | 0e43415013af1b715ca43d287983a95a621d5ecf (diff) | |
download | netsurf-c9bd38f5dddd8b80622e68895da3fad9ac833709.tar.gz netsurf-c9bd38f5dddd8b80622e68895da3fad9ac833709.tar.bz2 |
Check for calloc() failing
svn path=/trunk/netsurf/; revision=3885
Diffstat (limited to 'content/fetchers/fetch_data.c')
-rw-r--r-- | content/fetchers/fetch_data.c | 3 |
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; |