]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix typo in VG_(munmap)() error checking, which made it never remove
authorJeremy Fitzhardinge <jeremy@valgrind.org>
Sat, 20 Dec 2003 18:19:50 +0000 (18:19 +0000)
committerJeremy Fitzhardinge <jeremy@valgrind.org>
Sat, 20 Dec 2003 18:19:50 +0000 (18:19 +0000)
any Segment mappings.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2136

coregrind/vg_mylibc.c

index c061535a381120138d1108f89d8bceb52c310e9c..6304ca466bfe7b47659b8a199ca7cae6da10d3a6 100644 (file)
@@ -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;
 }