Blob Blame History Raw
--- lablgl-1.07/Togl/src/Togl/togl.c.orig	2023-02-21 06:45:05.000000000 -0700
+++ lablgl-1.07/Togl/src/Togl/togl.c	2023-06-20 18:51:32.781837861 -0600
@@ -2780,7 +2780,6 @@ noFaultXAllocColor(Display *dpy, Colorma
     subColor.red = ctable[bestmatch].red;
     subColor.green = ctable[bestmatch].green;
     subColor.blue = ctable[bestmatch].blue;
-    free(ctable);
     /* Try to allocate the closest match color.  This should only fail if the
      * cell is read/write.  Otherwise, we're incrementing the cell's reference
      * count. */
@@ -2792,6 +2791,7 @@ noFaultXAllocColor(Display *dpy, Colorma
         subColor.blue = ctable[bestmatch].blue;
         subColor.flags = DoRed | DoGreen | DoBlue;
     }
+    free(ctable);
     *color = subColor;
 }