Project

General

Profile

Actions

Bug #1185

closed
VJ VJ

napatech: cppcheck warning

Bug #1185: napatech: cppcheck warning

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

AM Updated by Andreas Moe almost 10 years ago Actions #1

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

VJ Updated by Victor Julien almost 10 years ago Actions #2

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

VJ Updated by Victor Julien over 8 years ago Actions #3

  • 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

VJ Updated by Victor Julien over 8 years ago Actions #4

  • Status changed from Assigned to Closed
Actions

Also available in: PDF Atom