URI: 
       Handle errors on munmap. It can fail too. - catpoint - Catpoint simple presenting software.
  HTML git clone git://bitreich.org/catpoint/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/catpoint/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
   DIR LICENSE
       ---
   DIR commit c19639a4edb1186cdeb5655f0758506085dca7db
   DIR parent 9d56979dedbc9a3b279291ad07ab4ce277e8f5e7
  HTML Author: Christoph Lohmann <20h@r-36.net>
       Date:   Sun, 20 Dec 2020 14:34:51 +0100
       
       Handle errors on munmap. It can fail too.
       
       Diffstat:
         M catpoint.c                          |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/catpoint.c b/catpoint.c
       @@ -34,8 +34,10 @@ reload(char **argv, int i)
                struct stat statbuf;
                int fd;
        
       -        if (p[i] != NULL)
       -                munmap(p[i], 0x1000);
       +        if (p[i] != NULL) {
       +                if (munmap(p[i], 0x1000) < 0)
       +                        err(1, "munmap: %s", argv[i]);
       +        }
        
                fd = open(argv[i], O_RDONLY, 0);
                if (fd < 0)