Don't leak fd on fork error
authorKen Raeburn <raeburn@mit.edu>
Sat, 20 Oct 2007 00:48:40 +0000 (00:48 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 20 Oct 2007 00:48:40 +0000 (00:48 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20136 dc483132-0cff-0310-8789-dd5450dbe970

src/util/ss/help.c

index 0199397953df220816513158a84c8b71c82f9f3b..b144e282e6e7e609f21191c6239f7882f4a5965a 100644 (file)
@@ -73,6 +73,7 @@ got_it:
     switch (child = fork()) {
     case -1:
        ss_perror(sci_idx, errno, "Can't fork for pager");
+       close(fd);
        return;
     case 0:
        (void) dup2(fd, 0); /* put file on stdin */