MCPcopy Create free account
hub / github.com/MapServer/MapServer / msAllocCgiObj

Function msAllocCgiObj

cgiutil.c:477–492  ·  view source on GitHub ↗

** Allocate a new request holder structure */

Source from the content-addressed store, hash-verified

475** Allocate a new request holder structure
476*/
477cgiRequestObj *msAllocCgiObj() {
478 cgiRequestObj *request = (cgiRequestObj *)malloc(sizeof(cgiRequestObj));
479
480 if(!request)
481 return NULL;
482
483 request->ParamNames = (char **) msSmallMalloc(MS_DEFAULT_CGI_PARAMS*sizeof(char*));
484 request->ParamValues = (char **) msSmallMalloc(MS_DEFAULT_CGI_PARAMS*sizeof(char*));
485 request->NumParams = 0;
486 request->type = -1;
487 request->contenttype = NULL;
488 request->postrequest = NULL;
489 request->httpcookiedata = NULL;
490
491 return request;
492}
493
494void msFreeCgiObj(cgiRequestObj *request) {
495 msFreeCharArray(request->ParamNames, request->NumParams);

Callers 2

msAllocMapServObjFunction · 0.85
cgirequestObj_newFunction · 0.85

Calls 1

msSmallMallocFunction · 0.85

Tested by

no test coverage detected