From: Andrew Tridgell Date: Tue, 25 Jun 1996 04:16:02 +0000 (+0000) Subject: paranoid check for null buffer in unmap X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/84664c1029ffbaefeed5b3f169f51bf87acfeeca?hp=981791bd45b0a784be79661b45eba2a537cea2fe paranoid check for null buffer in unmap --- diff --git a/util.c b/util.c index ad4dec95..4da0931a 100644 --- a/util.c +++ b/util.c @@ -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); }