Actions
Bug #1185
closednapatech: cppcheck warning
Affected Versions:
Effort:
Difficulty:
Label:
Description
Using cppcheck 1.64:
[src/runmode-napatech.c:171]: (error) Memory leak: conf
Actions
Added by Victor Julien over 11 years ago. Updated about 8 years ago.
Description
Using cppcheck 1.64:
[src/runmode-napatech.c:171]: (error) Memory leak: conf
Can't seem to find this cppcheck error message, is this bug report not an issue anymore?
It's quite easy to spot w/o cppcheck:
struct NapatechStreamDevConf *conf = SCMalloc(sizeof(struct NapatechStreamDevConf));
if (unlikely(conf == NULL))
return NULL;
if (dev_len < 3 || dev_len > 5)
{
SCLogError(SC_ERR_NAPATECH_PARSE_CONFIG, "Could not parse config for device: %s - invalid length", device);
return NULL; // <- conf not freed.
}