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 42a94bc774e8edadef6e44e824015dc3da146b21..ccfcf0df52ce3e705ee242c2e196635ebc714828 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