[med-svn] [SCM] aghermann branch, master, updated. 551e213a23b59b71cba6a9c3a282d1b60e21b854

Andrei Zavada johnhommer at gmail.com
Sun Apr 21 23:17:55 UTC 2013


The following commit has been merged in the master branch:
commit dc4a02541472c97d0513c1fd326ace7cd24ba791
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Thu Apr 11 17:50:53 2013 +0300

    munmap on unparsable header in CEDFFile ctor

diff --git a/src/libsigfile/edf.cc b/src/libsigfile/edf.cc
index 36389cb..21c63a8 100644
--- a/src/libsigfile/edf.cc
+++ b/src/libsigfile/edf.cc
@@ -143,6 +143,7 @@ CEDFFile (const char *fname_, int flags_)
 	if ( _parse_header() ) {  // creates channels list
 		if ( not (flags_ & no_field_consistency_check) ) {
 			close( _fd);
+			munmap( _mmapping, _fsize);
 			throw runtime_error (explain_edf_status(_status));
 		} else
 			fprintf( stderr, "CEDFFile::CEDFFile(\"%s\") Warning: parse header failed, but proceeding anyway\n", fname_);

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list