From ff5c99445acab9ddb11bcd8ada8798da2dcd3825 Mon Sep 17 00:00:00 2001 From: jbj Date: Fri, 11 Jun 2004 19:26:54 +0000 Subject: [PATCH] - fix: malloc failure from dbus test suite (#124747). CVS patchset: 7309 CVS date: 2004/06/11 19:26:54 --- expat/lib/xmlparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 82f67c6..6300722 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -5518,8 +5518,10 @@ lookup(HASH_TABLE *table, KEY name, size_t createSize) table->size = (size_t)1 << INIT_POWER; tsize = table->size * sizeof(NAMED *); table->v = (NAMED **)table->mem->malloc_fcn(tsize); - if (!table->v) + if (!table->v) { + table->size = 0; return NULL; + } memset(table->v, 0, tsize); i = hash(name) & ((unsigned long)table->size - 1); } -- 2.7.4