From 218b73f1db2415b30f688c622b9faf07ae2eedbe Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 17 Sep 2012 19:56:49 +0200 Subject: [PATCH] another round of memory leaks --- mapwcs.c | 5 +++-- mapwfs.c | 2 +- mapwfs11.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mapwcs.c b/mapwcs.c index 3eff18b7c3..c1fa36402f 100644 --- a/mapwcs.c +++ b/mapwcs.c @@ -962,8 +962,9 @@ static int msWCSGetCapabilities(mapObj *map, wcsParamsObj *params, cgiRequestObj else { /* set default updatesequence */ if(!updatesequence) - updatesequence = msStrdup("0"); - params->updatesequence = msStrdup(updatesequence); + params->updatesequence = msStrdup("0"); + else + params->updatesequence = msStrdup(updatesequence); } /* if a bum section param is passed, throw exception */ diff --git a/mapwfs.c b/mapwfs.c index 9d5fe3f4d7..6df8b12524 100644 --- a/mapwfs.c +++ b/mapwfs.c @@ -368,8 +368,8 @@ static int msWFSGetFeatureApplySRS(mapObj *map, const char *srs, const char *ver nTmp = msLoadProjectionStringEPSG(&(sProjTmp), pszOutputSRS); if (nTmp == 0) { msProjectRect(&(map->projection), &(sProjTmp), &map->extent); - msFreeProjection(&(sProjTmp)); } + msFreeProjection(&(sProjTmp)); /*check if the srs passed is valid. Assuming that it is an EPSG:xxx format, Or urn:ogc:def:crs:EPSG:xxx format. */ if (strncasecmp(pszOutputSRS, "EPSG:", 5) == 0 || diff --git a/mapwfs11.c b/mapwfs11.c index b4e68c8561..68f2d4bd93 100644 --- a/mapwfs11.c +++ b/mapwfs11.c @@ -336,6 +336,8 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params, xmlNewNs(psRootNode, BAD_CAST namespaceList->namespaces[i].uri, BAD_CAST namespaceList->namespaces[i].prefix); } } + msGMLFreeNamespaces(namespaceList); + xmlNewProp(psRootNode, BAD_CAST "version", BAD_CAST params->pszVersion );