MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / SingleSourceCtx_Free

Function SingleSourceCtx_Free

src/procedures/proc_ss_paths.c:66–84  ·  view source on GitHub ↗

free SingleSourceCtx

Source from the content-addressed store, hash-verified

64
65// free SingleSourceCtx
66static void SingleSourceCtx_Free
67(
68 SingleSourceCtx *ctx
69) {
70 if(ctx == NULL) return;
71
72 uint32_t levelsCount = array_len(ctx->levels);
73 for(int i = 0; i < levelsCount; i++) array_free(ctx->levels[i]);
74 if(ctx->levels) array_free(ctx->levels);
75 if(ctx->path) Path_Free(ctx->path);
76 if(ctx->neighbors) array_free(ctx->neighbors);
77 if(ctx->relationIDs) {
78 array_free(ctx->relationIDs);
79 }
80 if(ctx->path_count == 0 && ctx->array != NULL) array_free(ctx->array);
81 else if(ctx->path_count > 1 && ctx->heap != NULL) Heap_free(ctx->heap);
82 array_free(ctx->output);
83 rm_free(ctx);
84}
85
86// initialize returned values pointers
87static void _process_yield

Callers 2

Proc_SSpathsInvokeFunction · 0.85
Proc_SSpathsFreeFunction · 0.85

Calls 5

array_lenFunction · 0.85
array_freeFunction · 0.85
Path_FreeFunction · 0.85
Heap_freeFunction · 0.85
rm_freeFunction · 0.85

Tested by

no test coverage detected