Project

General

Profile

Actions

Bug #3858

closed

pcap recursive: coverity issues

Added by Victor Julien over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

** CID 1465655:  Resource leaks  (RESOURCE_LEAK)
/src/source-pcap-file.c: 310 in ReceivePcapFileThreadInit()

________________________________________________________________________________________________________
*** CID 1465655:  Resource leaks  (RESOURCE_LEAK)
/src/source-pcap-file.c: 310 in ReceivePcapFileThreadInit()
304                 pv->should_loop = (should_loop == 1);
305             }
306     
307             if (pv->should_recurse == true && pv->should_loop == true) {
308                 SCLogError(SC_ERR_INVALID_ARGUMENT, "Error, --pcap-file-continuous and --pcap-file-recursive " 
309                                                     "cannot be used together.");
>>>     CID 1465655:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "ptv" going out of scope leaks the storage it points to.
310                 SCReturnInt(TM_ECODE_FAILED);
311             }
312     
313             pv->delay = 30;
314             intmax_t delay = 0;
315             if (ConfGetInt("pcap-file.delay", &delay) == 1) {

** CID 1465654:  Resource leaks  (RESOURCE_LEAK)
/src/source-pcap-file.c: 310 in ReceivePcapFileThreadInit()

________________________________________________________________________________________________________
*** CID 1465654:  Resource leaks  (RESOURCE_LEAK)
/src/source-pcap-file.c: 310 in ReceivePcapFileThreadInit()
304                 pv->should_loop = (should_loop == 1);
305             }
306     
307             if (pv->should_recurse == true && pv->should_loop == true) {
308                 SCLogError(SC_ERR_INVALID_ARGUMENT, "Error, --pcap-file-continuous and --pcap-file-recursive " 
309                                                     "cannot be used together.");
>>>     CID 1465654:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "pv" going out of scope leaks the storage it points to.
310                 SCReturnInt(TM_ECODE_FAILED);
311             }
312     
313             pv->delay = 30;
314             intmax_t delay = 0;
315             if (ConfGetInt("pcap-file.delay", &delay) == 1) {

** CID 1426081:  Resource leaks  (RESOURCE_LEAK)
/src/source-pcap-file.c: 310 in ReceivePcapFileThreadInit()

________________________________________________________________________________________________________
*** CID 1426081:  Resource leaks  (RESOURCE_LEAK)
/src/source-pcap-file.c: 310 in ReceivePcapFileThreadInit()
304                 pv->should_loop = (should_loop == 1);
305             }
306     
307             if (pv->should_recurse == true && pv->should_loop == true) {
308                 SCLogError(SC_ERR_INVALID_ARGUMENT, "Error, --pcap-file-continuous and --pcap-file-recursive " 
309                                                     "cannot be used together.");
>>>     CID 1426081:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "directory" going out of scope leaks the storage it points to.
310                 SCReturnInt(TM_ECODE_FAILED);
311             }
312     
313             pv->delay = 30;
314             intmax_t delay = 0;
315             if (ConfGetInt("pcap-file.delay", &delay) == 1) {
Actions #1

Updated by Victor Julien over 4 years ago

  • Subject changed from pcap recurise: coverity issues to pcap recursive: coverity issues
Actions #2

Updated by Victor Julien over 4 years ago

  • Status changed from Assigned to Closed
  • Assignee changed from James Dutrisac to Victor Julien
Actions

Also available in: Atom PDF