diff --git a/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c b/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c index bc1a2848aa1..9d1584ad67c 100644 --- a/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c +++ b/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c @@ -1298,6 +1298,7 @@ void X11SD_DisposeXImage(XImage * image) { #ifdef MITSHM if (image->obdata != NULL) { X11SD_DropSharedSegment((XShmSegmentInfo*)image->obdata); + free(image->obdata); image->obdata = NULL; } #endif /* MITSHM */