mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-02 22:52:26 +00:00
Fix delete vs delete[] mismatches
This fixes a bunch of valgrind warnings.
This commit is contained in:
parent
39be5a8b13
commit
b82f9ed2b3
@ -50,7 +50,7 @@ GlzDecoderWindow::GlzDecoderWindow(int pixels_capacity, GlzDecoderDebug &debug_c
|
||||
GlzDecoderWindow::~GlzDecoderWindow()
|
||||
{
|
||||
clear();
|
||||
delete _images;
|
||||
delete[] _images;
|
||||
}
|
||||
|
||||
DecodedImageWinId GlzDecoderWindow::pre_decode(uint64_t image_id, uint64_t relative_head_id)
|
||||
@ -246,7 +246,7 @@ void GlzDecoderWindow::realloc(int size)
|
||||
for (int i = 0; i < _n_images; i++) {
|
||||
new_images[i] = _images[(i + _head_idx) % _images_capacity];
|
||||
}
|
||||
delete _images;
|
||||
delete[] _images;
|
||||
|
||||
_images = new_images;
|
||||
_head_idx = 0;
|
||||
|
||||
@ -181,7 +181,7 @@ RedPixmapCairo::~RedPixmapCairo()
|
||||
cairo_destroy(((RedDrawable_p*)get_opaque())->cairo);
|
||||
if (((PixelsSource_p*)get_opaque())->type == PIXELS_SOURCE_TYPE_PIXMAP) {
|
||||
delete ((PixelsSource_p*)get_opaque())->pixmap.x_image;
|
||||
delete _data;
|
||||
delete[] _data;
|
||||
} else {
|
||||
XShmSegmentInfo *shminfo = ((PixelsSource_p*)get_opaque())->x_shm_drawable.shminfo;
|
||||
XShmDetach(XPlatform::get_display(), shminfo);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user