From 0125e939a91483b1a2f3d36a8f46ffb58ceb8bf5 Mon Sep 17 00:00:00 2001 From: mgambrell Date: Mon, 4 Jul 2022 00:00:38 -0500 Subject: [PATCH] vorbisfile.cpp - change free(x) to `delete x` (fixes #1556) --- project/src/media/codecs/vorbis/VorbisFile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/src/media/codecs/vorbis/VorbisFile.cpp b/project/src/media/codecs/vorbis/VorbisFile.cpp index bb05c613e..ab4a0a441 100644 --- a/project/src/media/codecs/vorbis/VorbisFile.cpp +++ b/project/src/media/codecs/vorbis/VorbisFile.cpp @@ -81,7 +81,7 @@ namespace lime { static int VorbisFile_BufferClose (VorbisFile_Buffer* src) { - free (src); + delete src; return 0; } @@ -154,8 +154,8 @@ namespace lime { if (ov_open_callbacks (buffer, vorbisFile, NULL, 0, VORBIS_FILE_BUFFER_CALLBACKS) != 0) { - free (buffer); - free (vorbisFile); + delete buffer; + delete vorbisFile; return 0; } @@ -178,7 +178,7 @@ namespace lime { if (ov_open_callbacks (file, vorbisFile, NULL, 0, VORBIS_FILE_FILE_CALLBACKS) != 0) { - free (vorbisFile); + delete vorbisFile; lime::fclose (file); return 0;