summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2005-02-12 16:53:19 +0000
committerJean Delvare <jdelvare@suse.de>2005-02-12 16:53:19 +0000
commit600ea28cc100be39836c2483f101cbfa39b87c89 (patch)
tree8006c0c72c6b7b5d62fe3229d8214ecc9ec64e48 /util.c
parent0fd532aad22bfeacac0d6cee12a2a25dd751586e (diff)
downloaddmidecode-git-600ea28cc100be39836c2483f101cbfa39b87c89.tar.gz
Fix incorrect length in munmap call.
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 2 insertions, 3 deletions
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 <khali@linux-fr>
+ * (C) 2002-2005 Jean Delvare <khali@linux-fr>
*
* 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 <sys/types.h>
@@ -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");