mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 15:53:52 +02:00
Campbell Barton's patch for mem leaks, http://www.graphicall.org/ftp/ideasman42/audacity_mem_leak_fix_r12450.diff
This commit is contained in:
@@ -233,6 +233,7 @@ int ExportMP2::Export(AudacityProject *project,
|
||||
{
|
||||
wxMessageBox(_("Cannot export MP2 with this sample rate and bit rate"),
|
||||
_("Error"), wxICON_STOP);
|
||||
twolame_close(&encodeOptions);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -243,6 +244,7 @@ int ExportMP2::Export(AudacityProject *project,
|
||||
FileIO outFile(fName, FileIO::Output);
|
||||
if (!outFile.IsOpened()) {
|
||||
wxMessageBox(_("Unable to open target file for writing"));
|
||||
twolame_close(&encodeOptions);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -596,7 +596,10 @@ char *ExportPCM::ConvertTo7bitASCII(const wxString wxStr)
|
||||
return NULL;
|
||||
char *pSrc = (char *)malloc(sr);
|
||||
if (!pSrc)
|
||||
{
|
||||
free(pDest);
|
||||
return NULL;
|
||||
}
|
||||
memset(pDest, 0, sr);
|
||||
memset(pSrc, 0, sr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user