From 61412f78f31f7ee4656ed5b5a4f7e8906f02c5c2 Mon Sep 17 00:00:00 2001 From: Willi Goesgens Date: Fri, 7 Nov 2014 13:05:10 +0100 Subject: [PATCH] Fix memleak: if we bail out, we need to free the json as we promised we would. --- arangod/Cluster/ClusterMethods.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/arangod/Cluster/ClusterMethods.cpp b/arangod/Cluster/ClusterMethods.cpp index c40c78af23..39ad9c54a8 100644 --- a/arangod/Cluster/ClusterMethods.cpp +++ b/arangod/Cluster/ClusterMethods.cpp @@ -543,6 +543,7 @@ int createDocumentOnCoordinator ( shared_ptr collinfo = ci->getCollection(dbname, collname); if (collinfo->empty()) { + TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); return TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND; }