diff options
author | Dave Beckett <dave@dajobe.org> | 2012-06-17 22:29:24 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2012-06-17 22:29:24 -0700 |
commit | fcd3dbd6a10ec71f24cf3084a0a335e56886f3e9 (patch) | |
tree | c63807f847081ecb4e2efb2ebd7e15665dcab7a9 /librdfa | |
parent | 401a52202663cef8db293eeba679f6ee2041e5c9 (diff) | |
download | raptor-fcd3dbd6a10ec71f24cf3084a0a335e56886f3e9.tar.gz |
(rdfa_create_new_element_context): Return NULL on OOM [clang]
Diffstat (limited to 'librdfa')
-rw-r--r-- | librdfa/context.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/librdfa/context.c b/librdfa/context.c index d42eef91..bdb80380 100644 --- a/librdfa/context.c +++ b/librdfa/context.c @@ -41,7 +41,7 @@ rdfacontext* rdfa_create_context(const char* base) /* malloc and init whole context to NULL */ rval = (rdfacontext*)malloc(sizeof(rdfacontext)); if(!rval) - return NULL; + return NULL; memset(rval, 0, sizeof(rdfacontext)); @@ -363,6 +363,9 @@ rdfacontext* rdfa_create_new_element_context(rdfalist* context_stack) context_stack->items[context_stack->num_items - 1]->data; rdfacontext* rval = rdfa_create_context(parent_context->base); + if(!rval) + return NULL; + /* * Otherwise, the values are: */ /* * the [ base ] is set to the [ base ] value of the current |