Permalink
Browse files

WFS: fix segfault when issuing GetFeature on a layer that can't be op…

…ened
  • Loading branch information...
rouault committed Nov 6, 2013
1 parent 6a5935d commit dc7f35c9735f3adad636969f8cc9e3b62de5d6b3
Showing with 11 additions and 3 deletions.
  1. +11 −3 mapwfs.c
View
@@ -3188,9 +3188,8 @@ int msWFSGetFeature(mapObj *map, wfsParamsObj *paramsObj, cgiRequestObj *req,
msFreeCharArray(tokens, n);
msLayerClose(lp);
}
if (strlen(papszPropertyName[k]) > 0) {
if (strlen(papszPropertyName[k]) > 0) {
if (strcasecmp(papszPropertyName[k], "*") == 0) {
/* Add all non-excluded items, including optional ones */
@@ -3272,8 +3271,17 @@ int msWFSGetFeature(mapObj *map, wfsParamsObj *paramsObj, cgiRequestObj *req,
msInsertHashTable(&(lp->metadata), "GML_GEOMETRIES", "none");
}
}
} else {/*empty string*/
} else {/*empty string*/
msInsertHashTable(&(lp->metadata), "GML_GEOMETRIES", "none");
}
}
else
{
msFree(pszPropertyName);
if( papszPropertyName )
msFreeCharArray(papszPropertyName, numlayers);
msFreeCharArray(layers, numlayers);
return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);
}
msGMLFreeItems(itemList);

0 comments on commit dc7f35c

Please sign in to comment.