]> granicus.if.org Git - imagemagick/commitdiff
Fix a small memory leak 7.0.3-10
authorCristy <urban-warrior@imagemagick.org>
Sun, 11 Dec 2016 00:49:44 +0000 (19:49 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 11 Dec 2016 00:49:44 +0000 (19:49 -0500)
coders/caption.c
coders/label.c

index b0241ac54f4a692e3cc52774e843dac541776bb5..0fe6fe1d1db50b8e3aa1916b4754177bd1421b66 100644 (file)
@@ -275,7 +275,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
     draw_info->direction == RightToLeftDirection ? image->columns-
     metrics.bounds.x2 : -metrics.bounds.x1,0.0),draw_info->gravity ==
     UndefinedGravity ? metrics.ascent : 0.0);
-  draw_info->geometry=AcquireString(geometry);
+  (void) CloneString(&draw_info->geometry,geometry);
   status=AnnotateImage(image,draw_info,exception);
   if (image_info->pointsize == 0.0)
     { 
index da25f1c493363c16683fc238b1800c2952448adc..dac96f3acd71bdc50ed9dd65f98255d890d515f4 100644 (file)
@@ -234,7 +234,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
     draw_info->direction == RightToLeftDirection ? image->columns-
     metrics.bounds.x2 : 0.0,draw_info->gravity == UndefinedGravity ?
     metrics.ascent : 0.0);
-  draw_info->geometry=AcquireString(geometry);
+  (void) CloneString(&draw_info->geometry,geometry);
   status=AnnotateImage(image,draw_info,exception);
   if (image_info->pointsize == 0.0)
     {