diff options
author | jsing <> | 2020-03-12 17:17:12 +0000 |
---|---|---|
committer | jsing <> | 2020-03-12 17:17:12 +0000 |
commit | 175ca43e2c7b1e7714399153118edc54b4268792 (patch) | |
tree | cbe1f5c6f04bd5de53bc196e0f48ecf824eef897 /src/lib/libc/stdlib/recallocarray.c | |
parent | 755b6e0d6d04ef513897a809271a846b984da4e8 (diff) | |
download | openbsd-175ca43e2c7b1e7714399153118edc54b4268792.tar.gz openbsd-175ca43e2c7b1e7714399153118edc54b4268792.tar.bz2 openbsd-175ca43e2c7b1e7714399153118edc54b4268792.zip |
Use calloc() rather than malloc() when allocating initial CBB buffer.
CBB uses recallocarray() to expand buffers, however was still using
malloc() for the initial buffer, which could result in memory being leaked
in incorrect use cases.
While here also use calloc() to allocate internal structs.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libc/stdlib/recallocarray.c')
0 files changed, 0 insertions, 0 deletions