Jeff L lats@yless4u.com.au writes:
- cMaxItems = 255; /* Pick an abritary size for buffers */
- analysis = (string_analysis*) pssa;
- if (!*pssa) { /* Clean it out and start again */
prtssa(*pssa);
ScriptStringFree((SCRIPT_STRING_ANALYSIS*)analysis);
- }
- analysis = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(string_analysis));
- *pssa = (string_analysis*)analysis;
I don't follow what you are trying to do here. Why do you print and free a NULL structure? And why do you assign it to analysis and then overwrite it right away with a new allocation?