X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/521bf4ff3ef47059265beff5d53c9e1162beb122..d0c3476bd6d011315d7928c12094912995095553:/src/unix/sound.cpp diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 6afa44f146..04100babf9 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -467,12 +467,14 @@ bool wxSound::Create(const wxString& fileName, wxUint8 *data = new wxUint8[len]; if ( fileWave.Read(data, len) != lenOrig ) { + delete [] data; wxLogError(_("Couldn't load sound data from '%s'."), fileName.c_str()); return false; } if (!LoadWAV(data, len, false)) { + delete [] data; wxLogError(_("Sound file '%s' is in unsupported format."), fileName.c_str()); return false;