summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/regex2.h
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-29 23:02:34 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-29 23:02:34 +0000
commit78af08e72aca2d0d823b51f887eaed8160773b93 (patch)
treea65fe5a3cce8f11fb69e56f881d0b0b0914b34e2 /lib/libc/regex/regex2.h
parentcaa2a6f36aa221602162cf3c48c71b51f3b3b2dd (diff)
downloadFreeBSD-src-78af08e72aca2d0d823b51f887eaed8160773b93.zip
FreeBSD-src-78af08e72aca2d0d823b51f887eaed8160773b93.tar.gz
Fix several memory leaks, and crashes, in iconvlist(3).
- Both curitem and curitem (via the names list) was always leaked. - malloc(3) failures lead to some leaks. - __bsd___iconv_get_list() failure lead to a crash since its error was not handles and __bsd___iconv_free_list() is not NULL-safe. I have slightly refactored this to avoid extra malloc and free logic in cases of malloc(3) failing. There are still bad assumptions here that I did not deal with. One of which is that the data will always have a '/' so the strchr(3) will not return NULL. Coverity CID: 1130055 1130054 1130053
Diffstat (limited to 'lib/libc/regex/regex2.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud