diff options
author | Shelley Vohr <shelley.vohr@gmail.com> | 2018-06-20 10:01:57 -0700 |
---|---|---|
committer | Santiago Gimeno <santiago.gimeno@gmail.com> | 2018-07-06 19:35:21 +0200 |
commit | 5124b27d355a868a07c51ca694c45b32b10f89b5 (patch) | |
tree | ffcd0664ea156ad315b775f6f60ab2a35e4a9efb /docs/src/request.rst | |
parent | b16d10a0177c32d6a9442d0758031cac8a5db36e (diff) | |
download | libuv-5124b27d355a868a07c51ca694c45b32b10f89b5.tar.gz libuv-5124b27d355a868a07c51ca694c45b32b10f89b5.zip |
src: add new error apis to prevent memory leaks
This PR creates two new externally-facing APIs, uv_err_name_r() and
uv_strerror_r().
In keeping with the precedent set by POSIX, the *_r() suffix of these
two new methods indicate that the caller does the memory management and
passes in the memory that the output will be stored in, which provides
an alternative for the two existent methods (uv_err_name() and
uv_strerror()), which, when called with an unknown error code, leak a
few bytes of memory.
PR-URL: https://github.com/libuv/libuv/pull/1898
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com
Diffstat (limited to 'docs/src/request.rst')
0 files changed, 0 insertions, 0 deletions