librazor/importer.c
changeset 471 a3e5e3eaf224
parent 442 c4bcba8023a9
child 472 219c7ea94a42
     1.1 --- a/librazor/importer.c	Sat Aug 23 16:28:31 2014 +0100
     1.2 +++ b/librazor/importer.c	Thu Jun 09 17:37:09 2016 +0100
     1.3 @@ -415,6 +415,8 @@
     1.4  		serialize_files(set, p, array);
     1.5  		p++;
     1.6  	}
     1.7 +
     1.8 +	array_release(&d->files);
     1.9  }
    1.10  
    1.11  static void
    1.12 @@ -434,6 +436,7 @@
    1.13  	struct import_entry *filenames;
    1.14  	char *f, *end;
    1.15  	uint32_t name, *r, s;
    1.16 +	uint32_t *map;
    1.17  	char dirname[256];
    1.18  	struct import_directory *d, *last_root;
    1.19  	struct array roots;
    1.20 @@ -441,11 +444,12 @@
    1.21  
    1.22  	count = importer->files.size / sizeof (struct import_entry);
    1.23  	filenames = importer->files.data;
    1.24 -	razor_qsort_with_data(filenames,
    1.25 -			      count,
    1.26 -			      sizeof (struct import_entry),
    1.27 -			      compare_filenames,
    1.28 -			      NULL);
    1.29 +	map = razor_qsort_with_data(filenames,
    1.30 +				    count,
    1.31 +				    sizeof (struct import_entry),
    1.32 +				    compare_filenames,
    1.33 +				    NULL);
    1.34 +	free(map);
    1.35  
    1.36  	array_init(&roots);
    1.37  	last_root = NULL;