[Wavelet-commit] Wavelet ColorBuffer.cc,1.6,1.7 StillImage.cc,1.7,1.8 avilib.c,1.7,1.8
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2005-08-15 18:38:23
|
Update of /cvsroot/wavelet/Wavelet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31074 Modified Files: ColorBuffer.cc StillImage.cc avilib.c Log Message: Fixed memory leaks found by Florian Stumpf and Johan Ehlers. Index: ColorBuffer.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/ColorBuffer.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ColorBuffer.cc 10 Aug 2005 09:35:23 -0000 1.6 --- ColorBuffer.cc 15 Aug 2005 16:24:23 -0000 1.7 *************** *** 18,21 **** --- 18,22 ---- #ifndef _WIN32_WCE #include <iostream> + #include <stdio.h> #else #include "WImage/miscdefs.h" Index: StillImage.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/StillImage.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StillImage.cc 10 Aug 2005 09:35:23 -0000 1.7 --- StillImage.cc 15 Aug 2005 16:24:23 -0000 1.8 *************** *** 131,135 **** break; } ! ir->read (); m_ysize = m_coeffs->rows (); m_xsize = m_coeffs->cols (); --- 131,144 ---- break; } ! try ! { ! ir->read (); ! DELETE (ir); ! } ! catch (const exception &error) ! { ! DELETENOTNULL (ir); ! throw; ! } m_ysize = m_coeffs->rows (); m_xsize = m_coeffs->cols (); *************** *** 194,198 **** } ! iw->write (); DELETE (m_coeffs); --- 203,216 ---- } ! try ! { ! iw->write (); ! DELETE (iw); ! } ! catch (const exception &error) ! { ! DELETENOTNULL (iw); ! throw; ! } DELETE (m_coeffs); Index: avilib.c =================================================================== RCS file: /cvsroot/wavelet/Wavelet/avilib.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** avilib.c 3 Nov 2004 14:19:48 -0000 1.7 --- avilib.c 15 Aug 2005 16:24:23 -0000 1.8 *************** *** 2218,2221 **** --- 2218,2229 ---- if(AVI->video_superindex) { if(AVI->video_superindex->aIndex) free(AVI->video_superindex->aIndex); + free(AVI->video_superindex->stdindex[ + AVI->video_superindex->nEntriesInUse - 1 + ]->aIndex); + for (j=0; j < NR_IXNN_CHUNKS; j++) + { + free(AVI->video_superindex->stdindex[j]); + } + free(AVI->video_superindex->stdindex); free(AVI->video_superindex); } |