This commit is contained in:
Nikolaj
2021-10-04 15:13:57 +02:00
parent 740d8bc1e0
commit 3f3346d22c
5 changed files with 5 additions and 8 deletions

View File

@@ -33,13 +33,7 @@ struct indexed_data* mk_indexed(struct record* rs, int n) {
}
void free_indexed(struct indexed_data* data) {
struct record* rs = malloc(sizeof(struct record*));
int n = data->n;
for (int i = 0 ; i < n ; i++) {
struct index_record* irec = &data->irs[i];
rs[i] = *irec->record;
}
free_records(rs, n);
free(data);
}
const struct record* lookup_indexed(struct indexed_data *data, int64_t needle) {