diff options
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r-- | src/vlib/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 0786465e0e4..66c0023cc94 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -2204,6 +2204,8 @@ pcap_dispatch_trace_command_internal (vlib_main_t * vm, { pm->n_packets_to_capture = pm->n_packets_captured; error = pcap_write (pm); + if (pm->file_descriptor >= 0) + pcap_close (pm); if (error) clib_error_report (error); else |