avoid leaking memory in addcolors()
authorTony Cook <tony@develop-help.com>
Tue, 16 Feb 2016 09:30:14 +0000 (20:30 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 16 Feb 2016 09:33:07 +0000 (20:33 +1100)
Imager.xs

index 42a94bc..ccfcf0d 100644 (file)
--- a/Imager.xs
+++ b/Imager.xs
@@ -3303,6 +3303,7 @@ i_addcolors(im, ...)
           }
         }
         RETVAL = i_addcolors(im, colors, items-1);
+        myfree(colors);
       OUTPUT:
         RETVAL