From 600ea28cc100be39836c2483f101cbfa39b87c89 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sat, 12 Feb 2005 16:53:19 +0000 Subject: Fix incorrect length in munmap call. --- util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 563abb8..9eda714 100644 --- a/util.c +++ b/util.c @@ -2,7 +2,7 @@ * Common "util" functions * This file is part of the dmidecode project. * - * (C) 2002-2004 Jean Delvare + * (C) 2002-2005 Jean Delvare * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +23,6 @@ * forms part of the process of creating an executable the information * including keys needed to generate an equivalently functional executable * are deemed to be part of the source code. - * */ #include @@ -138,7 +137,7 @@ void *mem_chunk(size_t base, size_t len, const char *devmem) memcpy(p, (u8 *)mmp+mmoffset, len); - if(munmap(mmp, mmoffset+0x20)==-1) + if(munmap(mmp, mmoffset+len)==-1) { fprintf(stderr, "%s: ", devmem); perror("munmap"); -- cgit v1.2.1