1189. [bug] On some systems, malloc(0) returns NULL, which
could cause the caller to report an out of memory error. [RT #2398]
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
||||
1189. [bug] On some systems, malloc(0) returns NULL, which
|
||||
could cause the caller to report an out of memory
|
||||
error. [RT #2398]
|
||||
|
||||
1188. [bug] Dynamic updates of a signed zone would fail if
|
||||
some of the zone private keys were unavailable.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mem.c,v 1.109 2001/12/05 19:13:26 bwelling Exp $ */
|
||||
/* $Id: mem.c,v 1.110 2002/01/22 15:40:24 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -680,6 +680,8 @@ mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) {
|
||||
static void *
|
||||
default_memalloc(void *arg, size_t size) {
|
||||
UNUSED(arg);
|
||||
if (size == 0)
|
||||
size = 1;
|
||||
return (malloc(size));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user