summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-05-26 16:09:35 -0700
committerBen Pfaff <blp@ovn.org>2017-06-01 16:20:49 -0700
commit7a36af8790c80c778601fad7fbceda5c4bbfb14a (patch)
tree4bef40bd515673297967e22cd5a49183d55187d2 /tests
parent63ae068ebf3d0ff7e3cb8d810ef87766187b7821 (diff)
downloadopenvswitch-7a36af8790c80c778601fad7fbceda5c4bbfb14a.tar.gz
test-conntrack: Close pcap file at end of test_pcap().
Seems wise, even if not strictly required. Found by Coverity. Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763099&defectInstanceId=4305325&mergedDefectId=180413&fileStart=251&fileEnd=269 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-conntrack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c
index 4213f5c2e..4c35b3a2c 100644
--- a/tests/test-conntrack.c
+++ b/tests/test-conntrack.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Nicira, Inc.
+ * Copyright (c) 2015, 2017 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -237,6 +237,7 @@ test_pcap(struct ovs_cmdl_context *ctx)
dp_packet_delete_batch(batch, true);
}
conntrack_destroy(&ct);
+ fclose(pcap);
}
static const struct ovs_cmdl_command commands[] = {