avoid pssible memleak

This commit is contained in:
Jacek Jendrzej
2016-04-21 16:59:51 +02:00
parent 8fb4e1b78e
commit 8d1e34a527
2 changed files with 4 additions and 2 deletions

View File

@@ -142,8 +142,10 @@ fb_pixel_t* CColorGradient::gradientOneColor(fb_pixel_t col, fb_pixel_t *gradien
start_v = max_v;
end_v = min_v;
break;
default:
default:{
free(gradientBuf);
return 0;
}
}
int bSize1 = ((mode == gradientDark2Light2Dark) || (mode == gradientLight2Dark2Light)) ? bSize/2 : bSize;