From: ray Date: Fri, 16 Jul 2010 21:47:02 +0000 (+0000) Subject: Close FILEs when fork fails. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f481a8640d45dd79f39b2b2a8ac66821fdd88925;p=openbsd Close FILEs when fork fails. OK nicm --- diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 443d1089430..8beed5500ad 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.78 2010/07/16 08:06:00 ray Exp $ */ +/* $OpenBSD: diffreg.c,v 1.79 2010/07/16 21:47:02 ray Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -382,7 +382,8 @@ diffreg(char *file1, char *file2, int flags) warnx("No more processes"); status |= 2; xfree(header); - return (D_ERROR); + rval = D_ERROR; + goto closem; case 0: /* child */ if (pfd[0] != STDIN_FILENO) {