From b59489466d7bc3038a779095e381c7595222eca0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 8 May 2005 00:36:11 +0000 Subject: [PATCH] smaller leakage (xml property, no wormhole) --- src/common/kernel/xmlreader.c | 1 + src/common/modules/wormhole.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c index c7113b455..b493a156d 100644 --- a/src/common/kernel/xmlreader.c +++ b/src/common/kernel/xmlreader.c @@ -185,6 +185,7 @@ xml_readconstruction(xmlXPathContextPtr xpath, xmlNodePtr * nodeTab, int nodeNr, if (property!=NULL) { pf_generic foo = get_function((const char*)property); a_add(&con->attribs, make_skillmod(NOSKILL, SMF_PRODUCTION, (skillmod_fun)foo, 1.0, 0)); + xmlFree(property); } } diff --git a/src/common/modules/wormhole.c b/src/common/modules/wormhole.c index c906378eb..16cb37448 100644 --- a/src/common/modules/wormhole.c +++ b/src/common/modules/wormhole.c @@ -172,6 +172,8 @@ create_wormholes(void) r=r->next; } + if (count<2) return; + match = (region**)malloc(sizeof(region*) * count); rptr = rlist; while (i!=count) {