paranoid check for null buffer in unmap

This commit is contained in:
Andrew Tridgell committed 1996-06-25 04:16:02 +00:00
1 parent 981791bd45
commit 84664c1029
1 file changed
+1 -1
+1 -1
View File
@@ -112,7 +112,7 @@ char *map_file(int fd,off_t len)
void unmap_file(char *buf,off_t len)
{
if (len > 0)
if (len > 0 && buf)
munmap(buf,len);
}