summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/regex2.h
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-24 18:44:50 +0000
committerngie <ngie@FreeBSD.org>2016-05-24 18:44:50 +0000
commiteba093149c09a994d9a51b286c887c680ec69d8e (patch)
tree6e17221d18549fda93232811468568a23c14d6d5 /lib/libc/regex/regex2.h
parent0f36ad80049b08e97edcca587589d43aa0bcb675 (diff)
downloadFreeBSD-src-eba093149c09a994d9a51b286c887c680ec69d8e.zip
FreeBSD-src-eba093149c09a994d9a51b286c887c680ec69d8e.tar.gz
Use reallocf instead of malloc to fix leak with outbuf_pmap
The previous code overwrote outbuf_pmap's memory with malloc once per loop iteration, which leaked its memory; use reallocf instead to ensure that memory is properly free'd each loop iteration. Add a outbuf_pmap = NULL in the failure case to avoid a double-free at the bottom of the function. Differential Revision: https://reviews.freebsd.org/D6495 MFC after: 1 week Reported by: Coverity CID: 1038776 Reviewed by: markj, pfgj Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/regex/regex2.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud