}
if (*token != ',')
GetNextToken(q,&q,extent,token);
- primitive_info[j].text=AcquireString(token);
+ (void) CloneString(&primitive_info[j].text,token);
/*
Compute text cursor offset.
*/
status&=DrawPrimitive(image,graphic_context[n],primitive_info,
exception);
}
- if (primitive_info->text != (char *) NULL)
- primitive_info->text=(char *) RelinquishMagickMemory(
- primitive_info->text);
proceed=SetImageProgress(image,RenderImageTag,q-primitive,(MagickSizeType)
primitive_extent);
if (proceed == MagickFalse)
macros=DestroySplayTree(macros);
token=DestroyString(token);
if (primitive_info != (PrimitiveInfo *) NULL)
- primitive_info=(PrimitiveInfo *) RelinquishMagickMemory(primitive_info);
+ {
+ for (i=0; primitive_info[i].primitive != UndefinedPrimitive; i++)
+ if (primitive_info[i].text != (char *) NULL)
+ primitive_info[i].text=(char *) RelinquishMagickMemory(
+ primitive_info[i].text);
+ primitive_info=(PrimitiveInfo *) RelinquishMagickMemory(primitive_info);
+ }
primitive=DestroyString(primitive);
if (stops != (StopInfo *) NULL)
stops=(StopInfo *) RelinquishMagickMemory(stops);