Project

General

Profile

Actions

Bug #3858

closed

pcap recursive: coverity issues

Added by Victor Julien over 4 years ago. Updated about 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

Also available in: Atom PDF