diff --git a/3rdParty/Makefile.all-in-one-protobuf b/3rdParty/Makefile.all-in-one-protobuf deleted file mode 100644 index cd3539f0d1..0000000000 --- a/3rdParty/Makefile.all-in-one-protobuf +++ /dev/null @@ -1,55 +0,0 @@ -# -*- mode: Makefile; -*- - -## ----------------------------------------------------------------------------- -## --SECTION-- LIBRARY -## ----------------------------------------------------------------------------- - -################################################################################ -### @brief Protobuf -################################################################################ - -BUILT_SOURCES += @PROTOBUF_LIBS@ -CLEANUP += @srcdir@/.protobuf-build-@TRI_BITS@ - -PROTOBUFDIR = @abs_top_srcdir@/3rdParty/protobuf-2.4.1/BUILD - -@PROTOBUF_LIBS@: @srcdir@/.protobuf-build-@TRI_BITS@ -@PROTOBUF_PROTOC@: @srcdir@/.protobuf-build-@TRI_BITS@ - -@srcdir@/.protobuf-build-@TRI_BITS@: - @echo - @echo "--------------------------------------------------------------------------------" - @echo "BUILDING Protocol Buffers" - @echo "--------------------------------------------------------------------------------" - @echo - - cd @top_srcdir@/3rdParty/protobuf-2.4.1 \ - && ./configure \ - --disable-dependency-tracking \ - --disable-shared \ - --prefix=$(PROTOBUFDIR) \ - --libdir=$(PROTOBUFDIR)/lib@TRI_BITS@ - cd @top_srcdir@/3rdParty/protobuf-2.4.1 && $(MAKE) install - - touch @srcdir@/.protobuf-build-@TRI_BITS@ - - @echo - @echo "--------------------------------------------------------------------------------" - @echo "BUILD Protocol Buffers FINISHED" - @echo "--------------------------------------------------------------------------------" - @echo - -################################################################################ -### @brief additional files to remove -################################################################################ - -CLEANUP += .protobuf-build-@TRI_BITS@ - -## ----------------------------------------------------------------------------- -## --SECTION-- END-OF-FILE -## ----------------------------------------------------------------------------- - -## Local Variables: -## mode: outline-minor -## outline-regexp: "^\\(### @brief\\|## --SECTION--\\|# -\\*- \\)" -## End: diff --git a/arangod/VocBase/document-collection.c b/arangod/VocBase/document-collection.c index 928da35c42..0abe9c3fdc 100755 --- a/arangod/VocBase/document-collection.c +++ b/arangod/VocBase/document-collection.c @@ -1892,7 +1892,7 @@ TRI_document_collection_t* TRI_OpenDocumentCollection (TRI_vocbase_t* vocbase, c collection = TRI_OpenCollection(vocbase, &sim->base.base, path); if (collection == NULL) { - LOG_ERROR("cannot open simple collection"); + LOG_ERROR("cannot open document collection from path '%s'", path); TRI_Free(TRI_UNKNOWN_MEM_ZONE, sim); return NULL; @@ -3097,6 +3097,11 @@ static TRI_index_t* CreateCapConstraintDocumentCollection (TRI_document_collecti // create a new index idx = TRI_CreateCapConstraint(&sim->base, size); + if (idx == NULL) { + TRI_set_errno(TRI_ERROR_OUT_OF_MEMORY); + + return NULL; + } if (iid) { idx->_iid = iid; diff --git a/arangod/VocBase/index.c b/arangod/VocBase/index.c index 24071e7fb8..0a18959f46 100755 --- a/arangod/VocBase/index.c +++ b/arangod/VocBase/index.c @@ -346,11 +346,16 @@ static TRI_json_t* JsonCapConstraint (TRI_index_t* idx, TRI_primary_collection_t } // create json object and fill it - json = TRI_CreateArrayJson(TRI_CORE_MEM_ZONE); + json = TRI_CreateArrayJson(TRI_UNKNOWN_MEM_ZONE); + if (json == NULL) { + TRI_set_errno(TRI_ERROR_OUT_OF_MEMORY); - TRI_Insert3ArrayJson(TRI_CORE_MEM_ZONE, json, "id", TRI_CreateNumberJson(TRI_CORE_MEM_ZONE, idx->_iid)); - TRI_Insert3ArrayJson(TRI_CORE_MEM_ZONE, json, "type", TRI_CreateStringCopyJson(TRI_CORE_MEM_ZONE, "cap")); - TRI_Insert3ArrayJson(TRI_CORE_MEM_ZONE, json, "size", TRI_CreateNumberJson(TRI_CORE_MEM_ZONE, cap->_size)); + return NULL; + } + + TRI_Insert3ArrayJson(TRI_UNKNOWN_MEM_ZONE, json, "id", TRI_CreateNumberJson(TRI_UNKNOWN_MEM_ZONE, idx->_iid)); + TRI_Insert3ArrayJson(TRI_UNKNOWN_MEM_ZONE, json, "type", TRI_CreateStringCopyJson(TRI_UNKNOWN_MEM_ZONE, "cap")); + TRI_Insert3ArrayJson(TRI_UNKNOWN_MEM_ZONE, json, "size", TRI_CreateNumberJson(TRI_UNKNOWN_MEM_ZONE, cap->_size)); return json; } @@ -424,7 +429,12 @@ TRI_index_t* TRI_CreateCapConstraint (struct TRI_primary_collection_s* collectio size_t size) { TRI_cap_constraint_t* cap; - cap = TRI_Allocate(TRI_CORE_MEM_ZONE, sizeof(TRI_cap_constraint_t), false); + cap = TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(TRI_cap_constraint_t), false); + if (cap == NULL) { + TRI_set_errno(TRI_ERROR_OUT_OF_MEMORY); + + return NULL; + } cap->base._iid = TRI_NewTickVocBase(); cap->base._type = TRI_IDX_TYPE_CAP_CONSTRAINT; @@ -461,7 +471,7 @@ void TRI_DestroyCapConstraint (TRI_index_t* idx) { void TRI_FreeCapConstraint (TRI_index_t* idx) { TRI_DestroyCapConstraint(idx); - TRI_Free(TRI_CORE_MEM_ZONE, idx); + TRI_Free(TRI_UNKNOWN_MEM_ZONE, idx); } //////////////////////////////////////////////////////////////////////////////// @@ -3171,6 +3181,7 @@ static TRI_json_t* JsonSkiplistIndex (TRI_index_t* idx, TRI_primary_collection_t path = collection->_shaper->lookupAttributePathByPid(collection->_shaper, shape); if (path == NULL) { TRI_Free(TRI_UNKNOWN_MEM_ZONE, fieldList); + return NULL; } fieldList[j] = ((const char*) path) + sizeof(TRI_shape_path_t) + path->_aidLength * sizeof(TRI_shape_aid_t); @@ -3181,8 +3192,9 @@ static TRI_json_t* JsonSkiplistIndex (TRI_index_t* idx, TRI_primary_collection_t // create json object and fill it // .......................................................................... json = TRI_CreateArrayJson(TRI_UNKNOWN_MEM_ZONE); - if (!json) { + if (json == NULL) { TRI_Free(TRI_UNKNOWN_MEM_ZONE, fieldList); + return NULL; } diff --git a/js/actions/system/api-blueprint.js b/js/actions/system/api-blueprint.js index 8c476c7e9a..fe03292adc 100644 --- a/js/actions/system/api-blueprint.js +++ b/js/actions/system/api-blueprint.js @@ -27,7 +27,7 @@ //////////////////////////////////////////////////////////////////////////////// (function() { - var actions = require("actions"); + var actions = require("org/arangodb/actions"); var graph = require("graph"); // ----------------------------------------------------------------------------- diff --git a/lib/HttpServer/PathHandler.cpp b/lib/HttpServer/PathHandler.cpp index af000cf177..448c87dcd0 100644 --- a/lib/HttpServer/PathHandler.cpp +++ b/lib/HttpServer/PathHandler.cpp @@ -155,8 +155,6 @@ namespace triagens { FileUtils::slurp(name, _response->body()); } catch (...) { - delete _response; - LOGGER_WARNING << "file '" << name << "' not readable"; _response = createResponse(HttpResponse::NOT_FOUND);