diff -r c4bcba8023a9 -r 45e2bb06c88d librazor/importer.c --- a/librazor/importer.c Sat Aug 23 16:28:31 2014 +0100 +++ b/librazor/importer.c Fri Apr 15 16:57:55 2016 +0100 @@ -415,6 +415,8 @@ serialize_files(set, p, array); p++; } + + array_release(&d->files); } static void @@ -434,6 +436,7 @@ struct import_entry *filenames; char *f, *end; uint32_t name, *r, s; + uint32_t *map; char dirname[256]; struct import_directory *d, *last_root; struct array roots; @@ -441,11 +444,12 @@ count = importer->files.size / sizeof (struct import_entry); filenames = importer->files.data; - razor_qsort_with_data(filenames, - count, - sizeof (struct import_entry), - compare_filenames, - NULL); + map = razor_qsort_with_data(filenames, + count, + sizeof (struct import_entry), + compare_filenames, + NULL); + free(map); array_init(&roots); last_root = NULL;