The following commit has been merged in the master branch:
commit dc4a02541472c97d0513c1fd326ace7cd24ba791
Author: Andrei Zavada <[email protected]>
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

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to