netsniff-ng: walk_t3_block: prevent fd from double close
commit44b463529a8a9f2ccd1ec2acb8a4dfc117a636cb
authorDaniel Borkmann <dborkman@redhat.com>
Wed, 12 Jun 2013 12:11:06 +0000 (12 14:11 +0200)
committerDaniel Borkmann <dborkman@redhat.com>
Wed, 12 Jun 2013 12:11:06 +0000 (12 14:11 +0200)
treef7e0b8b3e7349938cd5300684795b4fc98f10a7a
parent9c645ee7da2a82529ff3ed01d04e0893904d7702
netsniff-ng: walk_t3_block: prevent fd from double close

Only close the very first pcap file of multi-pcap files once, and not
once during next_multi_pcap_file and once during exit.

Discovered by Coverty scanner.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
netsniff-ng.c