summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/tcpdump/privsep_pcap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/privsep_pcap.c b/usr.sbin/tcpdump/privsep_pcap.c
index 685fe344720..ee4c3b1e5d8 100644
--- a/usr.sbin/tcpdump/privsep_pcap.c
+++ b/usr.sbin/tcpdump/privsep_pcap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep_pcap.c,v 1.13 2005/10/16 18:23:45 otto Exp $ */
+/* $OpenBSD: privsep_pcap.c,v 1.14 2005/11/13 19:37:50 otto Exp $ */
/*
* Copyright (c) 2004 Can Erkin Acar
@@ -382,10 +382,10 @@ priv_pcap_offline(const char *fname, char *errbuf)
fp = fdopen(p->fd, "r");
if (fp == NULL) {
- close(p->fd);
- p->fd = -1;
snprintf(errbuf, PCAP_ERRBUF_SIZE, "%s: %s", fname,
pcap_strerror(errno));
+ close(p->fd);
+ p->fd = -1;
goto bad;
}
}
@@ -503,9 +503,9 @@ priv_pcap_dump_open(pcap_t *p, char *fname)
}
f = fdopen(fd, "w");
if (f == NULL) {
- close(fd);
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "%s: %s",
fname, pcap_strerror(errno));
+ close(fd);
return (NULL);
}
}