mirror of https://github.com/lukechilds/node.git
Browse Source
malloc(0) and realloc(ptr, 0) have implementation-defined behavior in that the standard allows them to either return a unique pointer or a nullptr for zero-sized allocation requests. Normalize by always using a nullptr. - Introduce node::malloc, node::realloc and node::calloc that should be used throught our source. - Update all existing node source files to use the new functions instead of the native allocation functions. Fixes: https://github.com/nodejs/node/issues/7549 PR-URL: https://github.com/nodejs/node/pull/7564 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Conflicts: src/node.ccv6.x
Michael Dawson
8 years ago
committed by
Jeremiah Senkpiel
11 changed files with 67 additions and 32 deletions
Loading…
Reference in new issue