AmendHub

Download:

jcs

/

subtext

/

amendments

/

205

bile: Fix bogus free in bile_sorted_ids_by_type

ids was not being initialized to NULL, so when passed to EXPAND_TO_FIT,
realloc is doing a free of some junk pointer before malloc'ing a new
one.

jcs made amendment 205 about 1 year ago
--- bile.c Mon Jul 11 21:15:27 2022 +++ bile.c Fri Jul 15 21:39:49 2022 @@ -308,8 +308,11 @@ bile_sorted_ids_by_type(struct bile *bile, const OSTyp unsigned long **ret) { struct bile_object *o; - size_t count = 0, size = 0, n, j, t; - unsigned long *ids; + size_t count, size = 0, n, j, t; + unsigned long *ids = NULL; + + count = 0; + *ret = NULL; bile_check_sanity(bile);