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:
Brian Wellington
2002-01-22 15:40:24 +00:00
parent 2ca2e1a1ce
commit fca9cc33ad
2 changed files with 7 additions and 1 deletions

View File

@@ -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.

View File

@@ -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));
}