commit - b504a804cf269d86aebf0f805cc5eb135423f76a
commit + 6b798c3c8a2a1a0b86a2e6fbbe3d3be758f9b56c
blob - 20cc091e54b2160f436901349992bfba5394f004
blob + d0d1be448ea98d718d4cb76352f3fc9bc41de44a
--- lib/fileindex.c
+++ lib/fileindex.c
return NULL;
}
+static const struct got_error *
+free_entry_cb(const char *path, void *data, void *arg)
+{
+ struct got_fileindex_entry *entry = data;
+ got_fileindex_entry_free(entry);
+ return NULL;
+}
+
void
got_fileindex_free(struct got_fileindex *fileindex)
{
+ got_pathset_for_each_safe(fileindex->entries, free_entry_cb, NULL);
got_pathset_free(fileindex->entries);
free(fileindex);
}