I am having trouble correctly allocating memory for a parent function that will remain upon the child functions exit.
the call to the child function is
HTTP_packToGen((char*)http_headerContent.HTTP ..
the HTTP variable within http_headerContent is a char pointer that isn't allocated until the child function is called, http_headerContent is a static struct.
The following is called within HTTP_packToGen which is the child function
if (hdrContent == NULL)
{
hdrContent = (char*)malloc((strlen(command)+strlen(data)+sizeof(bool))+4);
memset(hdrContent, '\0', sizeof(*hdrContent));
}