summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/tcpdump/tcpdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/contrib/tcpdump/tcpdump.c')
-rw-r--r--freebsd/contrib/tcpdump/tcpdump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/freebsd/contrib/tcpdump/tcpdump.c b/freebsd/contrib/tcpdump/tcpdump.c
index 46145805..52fd2260 100644
--- a/freebsd/contrib/tcpdump/tcpdump.c
+++ b/freebsd/contrib/tcpdump/tcpdump.c
@@ -1119,9 +1119,9 @@ open_interface(const char *device, netdissect_options *ndo, char *ebuf)
/*
* Return an error for our caller to handle.
*/
- pcap_close(pc);
snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s: %s\n(%s)",
device, pcap_statustostr(status), cp);
+ pcap_close(pc);
return (NULL);
} else if (status == PCAP_ERROR_PERM_DENIED && *cp != '\0')
error("%s: %s\n(%s)", device,