Fixed memory leak in rgbConvert function (but result has to be freed)