If a memory allocation failure occurs during bracket expression parsing in regcomp, a double-free error may occur. Initially reported by Anastasia Belova <abelova@astralinux.ru>.
Fixed for glibc 2.42 via: commit 7ea06e994093fa0bcca0d0ee2c1db271d8d7885d Author: Florian Weimer <fweimer@redhat.com> Date: Mon Jul 21 21:43:49 2025 +0200 posix: Fix double-free after allocation failure in regcomp (bug 33185) If a memory allocation failure occurs during bracket expression parsing in regcomp, a double-free error may result. Reported-by: Anastasia Belova <abelova@astralinux.ru> Co-authored-by: Paul Eggert <eggert@cs.ucla.edu> Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>