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

Function QueriesLog_Free

src/queries_log/queries_log.c:146–168  ·  view source on GitHub ↗

free the QueriesLog structure's content

Source from the content-addressed store, hash-verified

144
145// free the QueriesLog structure's content
146void QueriesLog_Free
147(
148 QueriesLog log // queries log
149) {
150 ASSERT(log != NULL);
151
152 LoggedQuery *q = NULL;
153 CircularBuffer_ResetReader(log->queries);
154
155 while((q = CircularBuffer_Read(log->queries, NULL)) != NULL) {
156 // clean up
157 if(q->query != NULL) {
158 rm_free(q->query);
159 }
160 }
161
162 CircularBuffer_Free(log->swap);
163 CircularBuffer_Free(log->queries);
164
165 pthread_rwlock_destroy(&log->rwlock);
166
167 rm_free(log);
168}
169

Callers 1

_GraphContext_FreeFunction · 0.85

Calls 4

CircularBuffer_ReadFunction · 0.85
rm_freeFunction · 0.85
CircularBuffer_FreeFunction · 0.85

Tested by

no test coverage detected