summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcap.3pcap.in4
-rw-r--r--pcap_activate.3pcap7
2 files changed, 11 insertions, 0 deletions
diff --git a/pcap.3pcap.in b/pcap.3pcap.in
index 80101403..b2db565e 100644
--- a/pcap.3pcap.in
+++ b/pcap.3pcap.in
@@ -41,6 +41,10 @@ other interface on which the capture should be done, call
.BR pcap_create (),
set the appropriate options on the handle, and then activate it with
.BR pcap_activate ().
+If
+.BR pcap_activate ()
+fails, the handle should be closed with
+.BR pcap_close() .
.PP
To obtain a list of devices that can be opened for a live capture, call
.BR pcap_findalldevs ();
diff --git a/pcap_activate.3pcap b/pcap_activate.3pcap
index 162a9293..b9279ce1 100644
--- a/pcap_activate.3pcap
+++ b/pcap_activate.3pcap
@@ -118,5 +118,12 @@ codes as errors.
.B pcap_statustostr(3PCAP)
can be called, with a warning or error code as an argument, to fetch a
message describing the warning or error code.
+.LP
+If
+.B pcap_activate()
+fails, the
+.I pcap_t *
+is not closed and freed; it should be closed using
+.BR pcap_close() .
.SH SEE ALSO
pcap(3PCAP)