From df031a9f2a8dd2f2b53e8473912ab58b3cf5c88a Mon Sep 17 00:00:00 2001 From: Willi Goesgens Date: Thu, 25 Jun 2015 09:45:05 +0200 Subject: [PATCH] Find the right place where the json wasn't free'd --- arangod/Cluster/ClusterMethods.cpp | 1 + arangod/RestHandler/RestEdgeHandler.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arangod/Cluster/ClusterMethods.cpp b/arangod/Cluster/ClusterMethods.cpp index 30f550eaa1..4dfdbff136 100644 --- a/arangod/Cluster/ClusterMethods.cpp +++ b/arangod/Cluster/ClusterMethods.cpp @@ -1282,6 +1282,7 @@ int createEdgeOnCoordinator ( // First determine the collection ID from the name: shared_ptr collinfo = ci->getCollection(dbname, collname); if (collinfo->empty()) { + TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); return TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND; } string collid = StringUtils::itoa(collinfo->id()); diff --git a/arangod/RestHandler/RestEdgeHandler.cpp b/arangod/RestHandler/RestEdgeHandler.cpp index 56b8b8c194..37b30f088d 100644 --- a/arangod/RestHandler/RestEdgeHandler.cpp +++ b/arangod/RestHandler/RestEdgeHandler.cpp @@ -340,7 +340,6 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, if (error != TRI_ERROR_NO_ERROR) { generateTransactionError(collname.c_str(), error); - TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); return false; } // Essentially return the response we got from the DBserver, be it @@ -348,7 +347,6 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, _response = createResponse(responseCode); triagens::arango::mergeResponseHeaders(_response, resultHeaders); _response->body().appendText(resultBody.c_str(), resultBody.size()); - TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); return responseCode >= triagens::rest::HttpResponse::BAD; }