Multiple connections - same buffer

Using RpExternalCgi of Advanced Webserver (netOS6) I Iike to make several dynamic cgi-pages that will be frequently loaded by a client. As output I use the following code: char GlobalArray[1000]; void RpExternalCgi(void *theDataPtr, rpCgiPtr theCgiPtr) { sprintf(GlobalArray, "xyz… ", , , ,); theCgiPtr->fHttpResponse=eRpCgiHttpOk; theCgiPtr->fDataType=eRpDataTypeHtml; theCgiPtr->fResponseBufferPtr=GlobalArray; theCgiPtr->fResponseBufferLength=length; } I saw that this global buffer changes by multible callers using this function and so the client doesn’t get the right content. I used also use the malloc-function for each response. So I didn’t have any collision but i found no way to free the memory in this case. There is no RpExternalCgi_Destroy - function… Thaks for reading and helping… Chris