diff mbox

[ovs-dev] ovs-ofctl: Close pcap file at end of ofctl_ofp_parse_pcap().

Message ID 20170526230412.32764-1-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff May 26, 2017, 11:04 p.m. UTC
Seem wise even if not mandatory.

Found by Coverity.

Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763047&defectInstanceId=4305314&mergedDefectId=180420
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 utilities/ovs-ofctl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Justin Pettit June 1, 2017, 11:07 p.m. UTC | #1
> On May 26, 2017, at 4:04 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> Seem wise even if not mandatory.
> 
> Found by Coverity.
> 
> Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763047&defectInstanceId=4305314&mergedDefectId=180420
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Acked-by: Justin Pettit <jpettit@ovn.org>

--Justin
Ben Pfaff June 1, 2017, 11:33 p.m. UTC | #2
On Thu, Jun 01, 2017 at 04:07:08PM -0700, Justin Pettit wrote:
> 
> > On May 26, 2017, at 4:04 PM, Ben Pfaff <blp@ovn.org> wrote:
> > 
> > Seem wise even if not mandatory.
> > 
> > Found by Coverity.
> > 
> > Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763047&defectInstanceId=4305314&mergedDefectId=180420
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> 
> Acked-by: Justin Pettit <jpettit@ovn.org>

Thanks, applied to master.
diff mbox

Patch

diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 1a5e2345b7d4..140cd18e617a 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -2484,6 +2484,7 @@  ofctl_ofp_parse_pcap(struct ovs_cmdl_context *ctx)
         dp_packet_delete(packet);
     }
     tcp_reader_close(reader);
+    fclose(file);
 }
 
 static void