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) {