summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c
diff options
context:
space:
mode:
authorjsing <>2020-03-12 17:17:12 +0000
committerjsing <>2020-03-12 17:17:12 +0000
commit175ca43e2c7b1e7714399153118edc54b4268792 (patch)
treecbe1f5c6f04bd5de53bc196e0f48ecf824eef897 /src/lib/libc/stdlib/reallocarray.c
parent755b6e0d6d04ef513897a809271a846b984da4e8 (diff)
downloadopenbsd-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/reallocarray.c')
0 files changed, 0 insertions, 0 deletions