Skip to content

Commit

Permalink
fixing memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
DvirDukhan committed Mar 16, 2020
1 parent a450d7b commit 32cb68f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/execution_plan/execution_plan.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ static void _ExecutionPlanSegment_ConvertClause(GraphContext *gc, AST *ast, Exec
void ExecutionPlan_PopulateExecutionPlan(ExecutionPlan *plan) {
AST *ast = QueryCtx_GetAST();
GraphContext *gc = QueryCtx_GetGraphCtx();
plan->ast_segment = ast;

// Initialize the plan's record mapping if necessary.
// It will already be set if this ExecutionPlan has been created to populate a single stream.
Expand Down Expand Up @@ -793,7 +792,7 @@ ExecutionPlan *NewExecutionPlan(void) {
// Construct a new ExecutionPlanSegment.
ExecutionPlan *segment = ExecutionPlan_NewEmptyExecutionPlan();
ExecutionPlan_PopulateExecutionPlan(segment);

segment->ast_segment = ast_segment;
segments[i] = segment;
start_offset = end_offset;
}
Expand Down Expand Up @@ -1044,6 +1043,7 @@ void ExecutionPlan_Free(ExecutionPlan *plan) {
QueryGraph_Free(plan->query_graph);
if(plan->record_map) raxFree(plan->record_map);
if(plan->record_pool) ObjectPool_Free(plan->record_pool);
if(plan->ast_segment) AST_Free(plan->ast_segment);
rm_free(plan);
}

0 comments on commit 32cb68f

Please sign in to comment.