diff options
Diffstat (limited to 'usr.bin/rdist/docmd.c')
-rw-r--r-- | usr.bin/rdist/docmd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c index bb919a9..2da37c6 100644 --- a/usr.bin/rdist/docmd.c +++ b/usr.bin/rdist/docmd.c @@ -32,9 +32,11 @@ */ #ifndef lint -/*static char sccsid[] = "From: @(#)docmd.c 8.1 (Berkeley) 6/9/93";*/ +#if 0 +static char sccsid[] = "From: @(#)docmd.c 8.1 (Berkeley) 6/9/93"; +#endif static const char rcsid[] = - "$Id: docmd.c,v 1.9 1997/02/22 19:56:40 peter Exp $"; + "$Id$"; #endif /* not lint */ #include "defs.h" @@ -185,13 +187,16 @@ done: if (sc->sc_type == NOTIFY) notify(tempfile, rhost, sc->sc_args, 0); if (!nflag) { + struct linkbuf *nextihead; + (void) unlink(tempfile); - for (; ihead != NULL; ihead = ihead->nextp) { - free(ihead); + for (; ihead != NULL; ihead = nextihead) { + nextihead = ihead->nextp; if ((opts & IGNLNKS) || ihead->count == 0) continue; log(lfp, "%s: Warning: missing links\n", ihead->pathname); + free(ihead); } } } |