diff --git a/ChangeLog b/ChangeLog index 8c8b884edb..0c7b7e9374 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-02-04 Joseph Myers + + * malloc/malloc.c (tcache_get): Compare tcache->counts[tc_idx] + with 0, not tcache->entries[tc_idx]. + 2019-02-06 Stefan Liebler [BZ #23403] diff --git a/malloc/malloc.c b/malloc/malloc.c index 0abd653be2..59fa1a18a5 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -2948,7 +2948,7 @@ tcache_get (size_t tc_idx) { tcache_entry *e = tcache->entries[tc_idx]; assert (tc_idx < TCACHE_MAX_BINS); - assert (tcache->entries[tc_idx] > 0); + assert (tcache->counts[tc_idx] > 0); tcache->entries[tc_idx] = e->next; --(tcache->counts[tc_idx]); e->key = NULL;