fixed: some issues pointed out by valgrind

SPLIT ME
fix: pebkac with gradient banding

Yes, there was an issue with the gradient banding,

So proper gradient file size is around 30+KB per file with a flat color
it both small and nice.
Merge pull request #5051 from FernetMenta/valgrind

fixed: some issues pointed out by valgrind
Merge pull request #5078 from uNiversaI/icons2

fix: pebkac with gradient banding