From 198bc2820440da445db733d5567ae6dcc6722d20 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 26 Aug 2013 16:14:36 +0200 Subject: [PATCH] fixed memleak --- arangod/VocBase/document-collection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arangod/VocBase/document-collection.c b/arangod/VocBase/document-collection.c index d1c392dd77..c2cd8ee290 100644 --- a/arangod/VocBase/document-collection.c +++ b/arangod/VocBase/document-collection.c @@ -5001,6 +5001,8 @@ static TRI_index_t* CreateHashIndexDocumentCollection (TRI_document_collection_t document->base._primaryIndex._nrUsed); if (idx == NULL) { + TRI_DestroyVector(&paths); + TRI_DestroyVectorPointer(&fields); TRI_set_errno(TRI_ERROR_OUT_OF_MEMORY); return NULL; } @@ -5990,6 +5992,8 @@ static TRI_index_t* CreateBitarrayIndexDocumentCollection (TRI_document_collecti idx = TRI_CreateBitarrayIndex(&document->base, &fields, &paths, (TRI_vector_pointer_t*)(values), supportUndef, errorNum, errorStr); if (idx == NULL) { + TRI_DestroyVector(&paths); + TRI_DestroyVectorPointer(&fields); TRI_set_errno(TRI_ERROR_OUT_OF_MEMORY); return NULL; }