pcap-file: Fix memory leak in ovs_pcap_open().
In ovs_pcap_open(), we allocate memory for the 'p_file'
structure but not released when fopen fails.
Addresses-Coverity: ("Resource leak")
Fixes: ("pcap-file: Add nanosecond resolution pcap support.")
Acked-by: Aaron Conole
@@ -89,6 +89,7 @@ ovs_pcap_open(const char *file_name, const char *mode)
: mode[0] == 'w' ? "writing"
: "appending"),
ovs_strerror(errno));
+ free(p_file);
return NULL;
}
