RFR: JDK-8298093: improve cleanup and error handling of awt_parseColorModel in awt_parseImage.c
Phil Race
prr at openjdk.org
Mon Dec 5 22:04:10 UTC 2022
On Mon, 5 Dec 2022 09:51:42 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> The cleanup and error handling in function awt_parseColorModel in awt_parseImage.c could be improved.
src/java.desktop/share/native/libawt/awt/image/awt_parseImage.c line 104:
> 102: cmP)) <= 0) {
> 103: awt_freeParsedRaster(&imageP->raster, FALSE);
> 104: if (cmP->nBits != NULL) free(cmP->nBits);
It seems wrong to me that awt_parseColorModel should return a failure code and not have cleaned up any storage it itself allocated.
In other words this clean up belongs in there.
-------------
PR: https://git.openjdk.org/jdk/pull/11508
More information about the client-libs-dev
mailing list