]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 17 Feb 2013 00:09:16 +0000 (00:09 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 17 Feb 2013 00:09:16 +0000 (00:09 +0000)
MagickCore/annotate.c

index 8b423d5a3d19dd3a2cdedadda70f1189c5ab8ca9..f7e5510165ec0489f0b965a209a51c5f89a4aed2 100644 (file)
@@ -1945,6 +1945,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
       display=XOpenDisplay(draw_info->server_name);
       if (display == (Display *) NULL)
         {
+          UnlockSemaphoreInfo(annotate_semaphore);
           ThrowXWindowException(XServerError,"UnableToOpenXServer",
             draw_info->server_name);
           return(MagickFalse);
@@ -1966,6 +1967,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
       map_info=XAllocStandardColormap();
       if (map_info == (XStandardColormap *) NULL)
         {
+          UnlockSemaphoreInfo(annotate_semaphore);
           ThrowXWindowException(ResourceLimitError,"MemoryAllocationFailed",
             image->filename);
           return(MagickFalse);
@@ -1976,6 +1978,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
       visual_info=XBestVisualInfo(display,map_info,&resource_info);
       if (visual_info == (XVisualInfo *) NULL)
         {
+          UnlockSemaphoreInfo(annotate_semaphore);
           ThrowXWindowException(XServerError,"UnableToGetVisual",
             image->filename);
           return(MagickFalse);
@@ -1996,6 +1999,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
       font_info=XBestFont(display,&resource_info,MagickFalse);
       if (font_info == (XFontStruct *) NULL)
         {
+          UnlockSemaphoreInfo(annotate_semaphore);
           ThrowXWindowException(XServerError,"UnableToLoadFont",
             draw_info->font);
           return(MagickFalse);
@@ -2004,6 +2008,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
           (visual_info == (XVisualInfo *) NULL) ||
           (font_info == (XFontStruct *) NULL))
         {
+          UnlockSemaphoreInfo(annotate_semaphore);
           XFreeResources(display,visual_info,map_info,&pixel,font_info,
             &resource_info,(XWindowInfo *) NULL);
           ThrowXWindowException(XServerError,"UnableToLoadFont",