HomeFreeBSD

regex: fix freeing g->charjump in low memory condition

Description

regex: fix freeing g->charjump in low memory condition

computejumps() moves g->charjump to a position relativ to the value of
CHAR_MIN. As such, g->charjump doesn't necessarily point to the address
actually allocated. While regfree() takes that into account, the low
memory handling in regcomp_internal() doesn't. Fix that by free'ing
the actually allocated address, as in regfree().

MFC After: 2 weeks
Reviewed by: imp,jrtc27
Pull Request: https://github.com/freebsd/freebsd-src/pull/692

Details

Provenance
Corinna Vinschen <vinschen@redhat.com>Authored on Feb 2 2024, 6:30 PM
impCommitted on Feb 2 2024, 6:51 PM
Parents
rG4b1d3a30914e: daily/223.backup-zfs: improve daily_backup_zfs_verbose behaviour
Branches
Unknown
Tags
Unknown