Project

General

Profile

Actions

Bug #1185

closed

napatech: cppcheck warning

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

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

Description

Using cppcheck 1.64:

[src/runmode-napatech.c:171]: (error) Memory leak: conf

Actions #1

Updated by Andreas Moe over 5 years ago

Can't seem to find this cppcheck error message, is this bug report not an issue anymore?

Actions #2

Updated by Victor Julien over 5 years ago

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.
    }

Actions #3

Updated by Victor Julien almost 4 years ago

  • Status changed from New to Assigned
  • Assignee changed from Anonymous to Victor Julien
  • Target version changed from TBD to 4.0.2/4.0.3
Actions #4

Updated by Victor Julien almost 4 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF