]> granicus.if.org Git - sudo/commitdiff
In sudoers_io_close(), skip NULL io_fds[] elements.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 8 Jun 2010 20:57:18 +0000 (16:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 8 Jun 2010 20:57:18 +0000 (16:57 -0400)
plugins/sudoers/iolog.c

index 86bb7813108fe0159eff21b221e888f84cbce16d..35d05cdd612c2478478ac84b8e79a0da196685a2 100644 (file)
@@ -303,6 +303,8 @@ sudoers_io_close(int exit_status, int error)
     int i;
 
     for (i = 0; i < IOFD_MAX; i++) {
+       if (io_fds[i].v == NULL)
+           continue;
 #ifdef HAVE_ZLIB
        if (def_compress_io)
            gzclose(io_fds[i].g);