From: Jeremy Fitzhardinge Date: Sat, 20 Dec 2003 18:19:50 +0000 (+0000) Subject: Fix typo in VG_(munmap)() error checking, which made it never remove X-Git-Tag: svn/VALGRIND_2_1_1~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0bdc7ed7b613ebb590ffa2299eea7900364bd36;p=thirdparty%2Fvalgrind.git Fix typo in VG_(munmap)() error checking, which made it never remove any Segment mappings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2136 --- diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c index c061535a38..6304ca466b 100644 --- a/coregrind/vg_mylibc.c +++ b/coregrind/vg_mylibc.c @@ -306,7 +306,7 @@ void* VG_(mmap)( void* start, UInt length, Int VG_(munmap)( void* start, Int length ) { Int res = VG_(do_syscall)(__NR_munmap, (UInt)start, (UInt)length ); - if (!VG_(is_kerror)) + if (!VG_(is_kerror)(res)) VG_(unmap_range)((Addr)start, length); return VG_(is_kerror)(res) ? -1 : 0; }