pcap-file: fix segv on bad pcap format

pull/3421/head
Victor Julien 7 years ago
parent d0cded2523
commit 62e6e0eb3c

@ -41,7 +41,7 @@ void CleanupPcapFileFileVars(PcapFileFileVars *pfv)
pfv->pcap_handle = NULL;
}
if (pfv->filename != NULL) {
if (pfv->shared->should_delete) {
if (pfv->shared != NULL && pfv->shared->should_delete) {
SCLogDebug("Deleting pcap file %s", pfv->filename);
if (unlink(pfv->filename) != 0) {
SCLogWarning(SC_ERR_PCAP_FILE_DELETE_FAILED,

Loading…
Cancel
Save