diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index dd8cb0c0..e7dac3f4 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -2143,6 +2143,7 @@ SGPropertyNode::hash_table::bucket::~bucket () { for (int i = 0; i < _length; i++) delete _entries[i]; + delete [] _entries; } SGPropertyNode::hash_table::entry * @@ -2197,6 +2198,7 @@ SGPropertyNode::hash_table::~hash_table () { for (unsigned int i = 0; i < _data_length; i++) delete _data[i]; + delete [] _data; } SGPropertyNode * diff --git a/simgear/screen/texture.cxx b/simgear/screen/texture.cxx index 56fd9540..b3f96f04 100644 --- a/simgear/screen/texture.cxx +++ b/simgear/screen/texture.cxx @@ -538,6 +538,8 @@ SGTexture::ImageClose(SGTexture::ImageRec *image) { if (image->file) gzclose(image->file); if (file) fclose(file); delete[] image->tmp; + delete[] image->rowStart; + delete[] image->rowSize; delete image; } diff --git a/simgear/screen/texture.hxx b/simgear/screen/texture.hxx index 00265336..9f76cadb 100644 --- a/simgear/screen/texture.hxx +++ b/simgear/screen/texture.hxx @@ -42,6 +42,7 @@ protected: FILE *file; typedef struct _ImageRec { + _ImageRec(void) : tmp(0), rowStart(0), rowSize(0) {} unsigned short imagic; unsigned short type; unsigned short dim;