MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / destroy_sqlite_master

Function destroy_sqlite_master

db/sqlmaster.c:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33static void *create_master_row_for_view(struct dbview *view, int *sz);
34
35inline int destroy_sqlite_master(master_entry_t *arr, int arr_len)
36{
37 if (!arr)
38 return 0;
39
40 for (int i = 0; i < arr_len; i++) {
41 master_entry_t *ent = &arr[i];
42 if (ent->isstrdup)
43 free(ent->tblname);
44 free(ent->entry);
45 }
46 free(arr);
47 return 0;
48}
49
50/* accessor called from comdb2.c clean_exit() */
51void cleanup_sqlite_master()

Callers 7

cleanup_sqlite_masterFunction · 0.85
create_sqlite_masterFunction · 0.85
restore_old_rootpagesFunction · 0.85
done_sql_threadFunction · 0.85
sql_syntax_checkFunction · 0.85

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected